Sv translation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Functional Components of the RoleThe DATA role can be split on one or more servers. A setup with only one DATA server is only recommended for very small installations. The division corresponds to the following functional components:
From the installation point of view, these functional components have no effect because a complete local (synchronized) version of the database is stored on each server in the network. The distribution of the functions results more from the point of view of the "consumers" in which it is possible to configure which server can be accessed for which tasks. In the Web application server, for example, it is possible to specify the database connection for the primary, reporting, and real-time areas separately, so that it is possible to distribute these roles among different servers. The only aspect of the installation that is affected by the function distribution is that if you are distributing the functions to different servers, you will need to build and configure an appropriate MySQL replication setup. This means that the "Primary" function is forced to run on a Replication Master, while all other functions can run on Replication Slaves. Another very special type of configuration is a special setup in which two servers are connected in a master-master replication (which in turn can be used as masters for other slaves). In such a highly available configuration, only one of the masters is used as "primary". The other would normally serve as a passive reserve of the HA cluster. However, it is advisable to use this resource more sensibly by having the passive master perform either the "reporting" or the "statistics" function. The function-related IP addresses are managed by the HA manager. Such a configuration has the advantage of offering a high degree of availability without being too wasteful with resources. Common installation stepsIndependent of the function that a DATA server is to take over, the following installation steps must first be carried out on both master and slave. Linking the data areaConnect data area as described on the page Connection STORE (All Linux except STORE) Installing the SoftwareTo include the official MySQL software repositories and install the MySQL server, use the following commands: MySQL 8.x
MySQL 5.6
Both variantsThe MySQL Server service is added to the list of automatically starting services and started with the following command:
Next, the port shares for the MySQL server service must be entered and permanently stored in the firewall:
To simplify the configuration of the MySQL server, a directory is now created where modular configuration files can be stored. In order for these to be loaded from MySQL Server, an entry must be made in the main configuration file. This is done by entering the following commands:
These commands create the directory, add the load instruction for the modular configuration files to the main configuration file, create a SELINUX security share for the new configuration directory and generate the corresponding security labels. Next, a modular configuration file with some commented relevant optimization settings is imported. MySQL 8.x
The File MySQL 5.6
The File Both VariantsNow the MySQL server must be restarted:
After the first start of the MySQL server, the access data for the root user must now be defined. Since in MySQL a user account consists not only of a username but also of an origin address of the connection, another root user must be created to connect from any origin address. MySQL 8.xMySQL 8.x stores a generated password for the root user in the file /var/log/mysqld.log This password must be extracted first. Since it often contains special characters that cannot easily be entered in the command line, the first adjustment is made by entering the password manually.
Then the following command chain is entered to create the additional user: ATTENTION: replace <password> with the corresponding password.
MySQL 5.6ATTENTION: replace <password> with the corresponding password.
Both VariantsNext, an additional plugin module is added to MySQL Server. This module is required from jtel software version 3.06 for communication with other software components. For new installations, it should also be installed if it is planned to install older revisions of the software, so that nothing hinders a later update. This is done with the following commands:
To make the additional function available to SQL procedures, the following command must be executed (replace <password> with the corresponding password):
Adaptation of my.cnf to server RAM In order for the server to make full use of the provided RAM, a configuration must be adjusted with vi. This setting should be about 3/4 of the server's RAM, but leave 3-4 GB for mysql and other processes.
MySQL RestartFinally, the MySQL server is restarted so that all settings are applied:
|
Sv translation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Funktionelle Komponenten der RolleDie Rolle DATA kann auf einem oder mehrere Server aufgeteilt werden, wobei ein Setup mit nur einem DATA server nur bei sehr kleinen Installationen zu empfehlen ist. Die Aufteilung entspricht dabei folgenden funktionellen Komponenten:
Aus Sicht der Installation haben diese funktionelle Komponenten keine Auswirkungen da eine vollständige lokale (synchronisierte) Fassung der Datenbank auf jedem Server des Verbundes lagert. Die Aufteilung der Funktionen ergibt sich mehr aus Sicht der "Verbraucher" in denen Konfiguriert werden kann, auf welchem Server gegebenenfalls für welche Aufgaben zugegriffen werden kann. So ist es z.B. im Web-Application-Server möglich, die Datenbankanbindung für die Bereiche Primary, Reporting und Realtime separat anzugeben, so dass es möglich ist, diese Rollen auf verschiedene Server aufzuteilen. Der einzige Aspekt der Installation der durch die Funktionsaufteilung betroffen ist, ergibt sich aus der Tatsache, dass bei einem Verteilen der Funktionen auf verschiedene Server ein entsprechendes MySQL-Replikations-Setup aufgebaut und konfiguriert werden muss. Dadurch ergibt sich, dass die Funktion "Primary" erzwungenermaßen auf einem Replikations-Master läuft, während alle anderen Funktionen auf Replikations-Slaves laufen können. Eine sehr besondere Art der Konfiguration ist des weiteren ein spezielles Setup in dem zwei Server in einer Master-Master-Replikation zusammengeschlossen werden (die wiederrum beide als Master für weitere Slaves diesenen können). In einer solchen hoch verfügbaren Konfiguration wird nur einer der Master als "Primary" verwendet. Der andere würde üblicherweise als passive Reserve des HA-Clusters dienen. Es bietet sich allerdings an, diese Ressource sinnvoller zu nutzen, in dem der passive Master entweder die "Reporting" oder die "Statistik" Funktion übernimmt. Die Funktionsbezogenen IP-Adressen werden soweit vom HA-Manager verwaltet. Eine solche Konfiguration hat den Vorteil ein hohes Maß an Verfügbarkeit zu bieten, ohne allzu verschwenderisch mit den Ressourcen umzugehen. Gemeinsame InstallationsschritteUnabhängig von der Funktion die ein DATA Server übernehmen soll, sind erst mal folgende Installationsschritte zu tätigen auf sowohl Master als auch Slave. Anbinden des DatenbereichesDatenbereich anbinden, wie auf der Seite Linking STORE (All Linux except STORE) beschrieben. Installation der SoftwareDas Einbinden der offiziellen MySQL Software Repositores und die Installation des MySQL-Servers erfolgt mit folgenden Befehlen: MySQL 8.x
MySQL 5.6
Beide VariantenDer MySQL Server Dienst wird mit folgendem Befehl in die Liste der automatisch startenden Dienste aufgenommen und gestartet.
Als nächstes müssen in der Firewall die Port-Freigaben für den MySQL Server Dienst eingetragen und persistent gespeichert werden:
Um die Konfiguration des MySQL Servers zu vereinfachen, wird nun ein Verzeichnis angelegt, in dem modulare Konfigurationsdateien abgelegt werden können. Damit diese auch vom MySQL Server geladen werden, muss in der Hauptkonfigurationsdatei noch ein Eintrag erfolgenden. Dies erfolgt durch die Eingabe folgender Befehle:
Diese Befehle erzeugen das Verzeichnis, fügen der Hauptkonfigurationsdatei die Ladeanweisung für die modularen Konfigurationsdateien hinzu, erstellen eine SELINUX-Sicherheitsfreigabe für das neue Konfigurationsverzeichnis und erzeugen die entsprechenden Security-Labels. Als nächstes wird eine modulare Konfigurationsdatei mit einigen kommentierten relevanten Optimierungseinstellungen eingespielt. MySQL 8.x
Die Datei MySQL 5.6
Die Datei Beide VariantenNun muss der MySQL Server neu gestartet werden:
Nach dem ersten Start des MySQL Servers müssen nun die Zugangsdaten für den root-Benutzer festgelegt werden. Da in MySQL ein Benutzerkonto nicht nur aus einem Benutzernamen sondern auch aus eine Herkunftsadresse der Verbindung besteht, muss noch ein weiterer root-Benutzer erzeugt werden, der sich von beliebigen Herkunftsadressen verbinden darf. MySQL 8.xMySQL 8.x speichert ein generiertes Passwort für den root Benutzer in der Datei /var/log/mysqld.log Dieses Passwort muss als erstes extrahiert werden. Da es oft Sonderzeichen enthält, die nicht ohne Weiteres in die Kommandozeile eingegeben werden können, erfolgt die erste Anpassung durch manuelle Eingabe des Passwortes.
Anschließend wird folgende Befehlskette eingegeben um den weiteren User zu erstellen: ACHTUNG: <password> mit den entsprechenden Passwort ersetzen.
MySQL 5.6ACHTUNG: <password> mit den entsprechenden Passwort ersetzen.
Beide VariantenAls nächstes wird noch ein zusätzliches Plugin-Modul dem MySQL Server hinzugefügt. Dieses Modul wird ab jtel Software Version 3.06 für die Kommunikation mit weiteren Softwarekomponenten benötigt. Bei Neuinstallationen soll es aber auch dann installiert werden, wenn geplant ist, ältere Revisionen der Software einzuspielen, damit einem späteren Update nichts im Wege steht. Dies erfolgt durch folgende Befehle:
Um die zusätzliche Funktion den SQL Prozeduren verfügbar zu machen, muss noch folgender Befehl ausgeführt werden (<password> mit den entsprechenden Passwort ersetzen):
Anpassung my.cnf auf RAM des Servers Damit der Server den zur Verfügung gestellten RAM vollständig nutzt, muss eine Konfiguration angepasst werden mit vi. Diese Einstellung sollte ca. 3/4 des RAMs des Servers entsprechen, wobei 3-4 GB für mysql und andere Prozesse übrig bleiben sollten.
MySQL NeustartAls letztes wird der MySQL Server neu gestartet, damit alle Einstellungen übernommen werden:
|
Sv translation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Composantes fonctionnelles du rôleLe rôle de DONNÉES peut être réparti sur un ou plusieurs serveurs. Une installation avec un seul serveur DONNÉES n'est recommandée que pour les très petites installations. La division correspond aux composantes fonctionnelles suivantes :
Du point de vue de l'installation, ces composants fonctionnels n'ont aucun effet car une version locale (synchronisée) complète de la base de données est stockée sur chaque serveur du réseau. La répartition des fonctions résulte davantage du point de vue des "consommateurs" dans lequel il est possible de configurer quel serveur est accessible pour quelles tâches. Dans le serveur d'application Web, par exemple, il est possible de spécifier séparément la connexion à la base de données pour les zones primaire, de rapport et en temps réel, de sorte qu'il est possible de répartir ces rôles entre différents serveurs. Le seul aspect de l'installation qui est affecté par la distribution des fonctions est que si vous distribuez les fonctions à différents serveurs, vous devrez construire et configurer une installation de réplication MySQL appropriée. Cela signifie que la fonction "Primary" est forcée de s'exécuter sur un maître de réplication, tandis que toutes les autres fonctions peuvent s'exécuter sur des esclaves de réplication. Un autre type de configuration très particulier est une configuration spéciale dans laquelle deux serveurs sont connectés dans une réplication maître-maître (qui à son tour peut être utilisée comme maître pour d'autres esclaves). Dans une telle configuration hautement disponible, un seul des maîtres est utilisé comme "primaire". L'autre servirait normalement de réserve passive du cluster HA. Toutefois, il est conseillé d'utiliser cette ressource de manière plus judicieuse en demandant au maître passif d'effectuer soit la fonction "reporting", soit la fonction "statistiques". Les adresses IP liées aux fonctions sont gérées par le responsable de l'AP. Une telle configuration a l'avantage d'offrir un haut degré de disponibilité sans être trop gourmande en ressources. Common installation stepsIndépendamment de la fonction qu'un serveur DONNÉES doit prendre en charge, les étapes d'installation suivantes doivent d'abord être effectuées à la fois sur le maître et l'esclave. Relier le zones de donnéesConnecter la zone de données comme décrit sur la page Connection MAGASIN (Tous les Linux sauf MAGASIN) Installation du logicielPour inclure les dépôts officiels de logiciels MySQL et installer le serveur MySQL, utilisez les commandes suivantes : MySQL 8.x
MySQL 5.6
Les deux variantesLe service MySQL Server est ajouté à la liste des services à démarrage automatique et démarré avec la commande suivante :
Ensuite, les parts de port pour le service de serveur MySQL doivent être saisies et stockées de façon permanente dans le pare-feu :
Pour simplifier la configuration du serveur MySQL, un répertoire est maintenant créé où les fichiers de configuration modulaire peuvent être stockés. Pour qu'ils puissent être chargés à partir du serveur MySQL, une entrée doit être faite dans le fichier de configuration principal. Cela se fait en entrant les commandes suivantes :
Ces commandes créent le répertoire, ajoutent l'instruction de chargement des fichiers de configuration modulaire au fichier de configuration principal, créent une part de sécurité SELINUX pour le nouveau répertoire de configuration et génèrent les étiquettes de sécurité correspondantes. Ensuite, un fichier de configuration modulaire avec quelques paramètres d'optimisation pertinents commentés est importé. MySQL 8.x
Le fichier MySQL 5,6
Le fichier Les deux variantesMaintenant, le serveur MySQL doit être redémarré :
Après le premier démarrage du serveur MySQL, les données d'accès pour l'utilisateur root doivent maintenant être définies. Comme dans MySQL, un compte utilisateur ne se compose pas seulement d'un nom d'utilisateur mais aussi d'une adresse d'origine de la connexion, un autre utilisateur root doit être créé pour se connecter à partir de n'importe quelle adresse d'origine. MySQL 8.xMySQL 8.x stocke un mot de passe généré pour l'utilisateur root dans le fichier /var/log/mysqld.log Ce mot de passe doit d'abord être extrait. Comme il contient souvent des caractères spéciaux qui ne peuvent pas être facilement saisis dans la ligne de commande, le premier ajustement est effectué en saisissant le mot de passe manuellement.
Ensuite, la chaîne de commande suivante est saisie pour créer l'utilisateur supplémentaire : ATTENTION : remplacer <password> par le mot de passe correspondant.
MySQL 5,6ATTENTION : remplacer <password> par le mot de passe correspondant.
Les deux variantesEnsuite, un module de plugin supplémentaire est ajouté au serveur MySQL. Ce module est requis à partir de la version 3,06 du logiciel jtel pour la communication avec d'autres composants logiciels. Pour les nouvelles installations, il doit également être installé s'il est prévu d'installer d'anciennes révisions du logiciel, afin que rien n'entrave une mise à jour ultérieure. Cela se fait avec les commandes suivantes :
Pour mettre la fonction supplémentaire à la disposition des procédures SQL, la commande suivante doit être exécutée (remplacer <password> par le mot de passe correspondant) :
Adaptation de mon .cnf à la RAM du serveur Pour que le serveur puisse utiliser pleinement la mémoire vive fournie, une configuration doit être ajustée avec vi. Ce réglage devrait représenter environ 3/4 de la mémoire vive du serveur, mais laisse 3-4 Go pour mysql et d'autres processus.
Redémarrer MYSQLEnfin, le serveur MySQL est redémarré afin que tous les paramètres soient appliqués :
|