Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Content imported from a Scroll Translations translation file.
Sv translation
languageen

Table of Contents
maxLevel3
printablefalse

Introduction

Regardless of the function a server is to perform, except STORE (which makes the data area available to itself), the data area will be linked. The first VM to be set up should therefore be the role STORE.

Linking the data area

First a connection to the common data area is established. To do this, the path for the mount point is created with the following commands:

Translations Ignore


Code Block
titleConnect Datastore - create directory
mkdir /home/jtel/shared
chown jtel:jtel /home/jtel/shared



IThe connection is then configured in the /etc/fstab file. The file can be edited with a text editor. The following entry must be inserted into the file as an example (replace password with the corresponding password):

Translations Ignore


Code Block
titleAdditional entry in / etc / fstab
cat <<EOFF >> /etc/fstab
//acd-store/shared    /home/jtel/shared    cifs    user=jtel,password=<password>,uid=jtel,gid=jtel,file_mode=0755,dir_mode=0755    0    0
EOFF



ATTENTION: to connect old file shares (SMB 1.0) under CentOS 7.x the following entry is necessary:

Translations Ignore


Code Block
titleAdditional entry in / etc / fstab
cat <<EOFF >> /etc/fstab
//acd-store/shared    /home/jtel/shared    cifs    user=jtel,password=<password>,uid=jtel,gid=jtel,file_mode=0755,dir_mode=0755,vers=1.0    0    0
EOFF



The first block of the line describes the UNC of the release. Here the name of the computer (here acd-lb) must be adapted if necessary. The third block contains among other things the credentials for sharing. If a domain name is also required here, it can be added with an additional parameter domain=DOMAINNAME separated by commas. If it is desired for security reasons not to store the credentials in the /etc/fstab file, which for system-immanent reasons has no special reading restrictions, they can be stored in a separate file. Such a file would then have the following format (replace password with the appropriate password):

Translations Ignore


Code Block
titleFile with separate access data
domain=MYDOMAIN
username=jtel
password=<password>



This file can be placed in any useful location (e.g. root home directory or directly in the /etc directory) and can be given read-only access to root. Assuming that such a file would be named /etc/jtel-credentials, the file's permissions are secured with the following commands:

Translations Ignore


Code Block
languagebash
titleBackup of the access data file
chown root:root /etc/jtel-credentials
chmod 400 /etc/jtel-credentials



In the file /etc/fstab the entry would then look like this

Translations Ignore


Code Block
titleSecure entry in / etc / fstab
//acd-store/shared	/home/jtel/shared	cifs	credentials=/etc/jtel-credentials,uid=jtel,gid=jtel,file_mode=0755,dir_mode=0755	0	0



ATTENTION: to connect old file shares (SMB 1.0) under CentOS 7.x the following entry is necessary:

Translations Ignore


Code Block
titleSecure entry in / etc / fstab
//acd-store/shared	/home/jtel/shared	cifs	credentials=/etc/jtel-credentials,uid=jtel,gid=jtel,file_mode=0755,dir_mode=0755,vers=1.0	0	0




After configuring the connection, the share can now be mounted. This is done with the command:

Translations Ignore


Code Block
languagebash
titleConnect the share
mount /home/jtel/shared



After connecting, a short test shows that the files can be accessed:

Translations Ignore


Code Block
titleAccess test
[root@acd-db2 ~]# ls -la /home/jtel/shared/
total 52
drwxr-xr-x.  9 jtel jtel 4096 Mar 30 10:35 .
drwx------.  6 jtel jtel 4096 Jun 12 17:03 ..
drwxr-xr-x.  5 jtel jtel 4096 Mar 22 12:13 Data
drwxr-xr-x.  4 root root 4096 Jun 14 08:37 Import
drwxr-xr-x.  7 jtel jtel 4096 Jun 13 15:37 JTEL
drwxr-xr-x. 16 jtel jtel 4096 Mar 23 15:55 JTELCarrierPortal
drwxr-xr-x.  3 jtel jtel 4096 Jun 13 15:40 LogFiles
drwxr-xr-x.  3 jtel jtel 4096 Feb 10 12:49 LogFilesCall



Securing the mount

Adjust the crontab so that the mount itself is restored, so that the boot order of the systems is not important:

Translations Ignore


Code Block
languagebash
titleSecuring the mount
cat <<EOFF >> /etc/crontab
*/1  *  *  *  * root bash -c "if [ ! -d /home/jtel/shared/Data/system ]; then mount /home/jtel/shared ; fi"
EOFF




This can be tested as follows:

Translations Ignore


Code Block
languagebash
titleTesting ensuring the mount
ls /home/jtel/shared
(files are there and are listed)
 
umount /home/jtel/shared
ls /home/jtel/shared
(files are no longer there and are not listed)

... Wait up to one minute
 
ls /home/jtel/shared
(files are there and are listed)





Sv translation
languagede

Table of Contents
maxLevel3
printablefalse

Einführung

Unabhängig von der Funktion die ein Server übernehmen soll, ausser STORE (der den Datenbereich sich selbst zur Verfügung stellt), wird das Datenbereich angebunden. Als erster VM sollte also die Rolle STORE fertig eingerichtet sein.

Anbinden des Datenbereiches

Als erstes wird eine Verbindung zum gemeinsamen Datenbereich hergestellt. Hierfür wird der Pfad für den Einhängepunkt mit folgenden Befehlen erstellt:

Translations Ignore


Code Block
titleConnect Datastore - create directory
mkdir /home/jtel/shared
chown jtel:jtel /home/jtel/shared



Im Anschluss wird die Verbindung in die Datei /etc/fstab konfiguriert. Die Datei kann mit einem Texteditor bearbeitet werden. Folgender Eintrag muss exemplarisch in die Datei eingefügt werden (password mit den entsprechenden Passwort ersetzen):

Translations Ignore


Code Block
titleAdditional entry in / etc / fstab
cat <<EOFF >> /etc/fstab
//acd-store/shared    /home/jtel/shared    cifs    user=jtel,password=<password>,uid=jtel,gid=jtel,file_mode=0755,dir_mode=0755    0    0
EOFF



ACHTUNG: um alte File-Shares (SMB 1.0) anzubinden unter CentOS 7.x ist folgender Eintrag nötig:

Translations Ignore


Code Block
titleAdditional entry in / etc / fstab
cat <<EOFF >> /etc/fstab
//acd-store/shared    /home/jtel/shared    cifs    user=jtel,password=<password>,uid=jtel,gid=jtel,file_mode=0755,dir_mode=0755,vers=1.0    0    0
EOFF



Der erste Block der Zeile beschreibt den UNC der Freigabe. Hier muss gegebenenfalls der Name des Rechners (hier acd-lb) angepasst werden. Der dritte Block enthält unter anderem die Zugangsdaten zur Freigabe. Sollte hier auch Domainname notwendig sein, kann dieser mit einem zusätzlichen Parameter domain=DOMAINNAME durch Komma getrennt hinzugefügt werden. Ist es aus Sicherheitsgründen gewünscht, die Zugangsdaten nicht in der Datei /etc/fstab zu speichern, die aus systemimmanenten Gründen keine spezielle Leseeinschränkungen hat, so können diese in eine separate Datei ausgelagert werden. Eine solche Datei hätte dann folgendes Format (password mit den entsprechenden Passwort ersetzen):

Translations Ignore


Code Block
titleFile with separate access data
domain=MYDOMAIN
username=jtel
password=<password>



Diese Datei kann an einem beliebigen sinnvollen Ort (z.B. ins Home-Verzeichnis von root oder direkt ins /etc Verzeichnis) abgelegt werden und mit Nur-Leserechte für root ausgestattet werden. Unter der Annahme dass eine solche Datei den Namen /etc/jtel-credentials tragen würde, werden die Berechtigungen der Datei mit folgenden Befehlen gesichert:

Translations Ignore


Code Block
languagebash
titleBackup of the access data file
chown root:root /etc/jtel-credentials
chmod 400 /etc/jtel-credentials



In der Datei /etc/fstab würde der Eintrag dann folgendermaßen aussehen.

Translations Ignore


Code Block
titleSecure entry in / etc / fstab
//acd-store/shared	/home/jtel/shared	cifs	credentials=/etc/jtel-credentials,uid=jtel,gid=jtel,file_mode=0755,dir_mode=0755	0	0



ACHTUNG: um alte File-Shares (SMB 1.0) anzubinden unter CentOS 7.x ist folgender Eintrag nötig:

Translations Ignore


Code Block
titleSecure entry in / etc / fstab
//acd-store/shared	/home/jtel/shared	cifs	credentials=/etc/jtel-credentials,uid=jtel,gid=jtel,file_mode=0755,dir_mode=0755,vers=1.0	0	0




Nach dem Konfigurieren der Verbindung kann die Freigabe nun eingehängt werden. Dies erfolgt mit dem Befehl:

Translations Ignore


Code Block
languagebash
titleConnect the share
mount /home/jtel/shared



Nach dem Verbinden zeigt ein kurzer Test, dass auf die Dateien zugegriffen werden kann:

Translations Ignore


Code Block
titleAccess test
[root@acd-db2 ~]# ls -la /home/jtel/shared/
total 52
drwxr-xr-x.  9 jtel jtel 4096 Mar 30 10:35 .
drwx------.  6 jtel jtel 4096 Jun 12 17:03 ..
drwxr-xr-x.  5 jtel jtel 4096 Mar 22 12:13 Data
drwxr-xr-x.  4 root root 4096 Jun 14 08:37 Import
drwxr-xr-x.  7 jtel jtel 4096 Jun 13 15:37 JTEL
drwxr-xr-x. 16 jtel jtel 4096 Mar 23 15:55 JTELCarrierPortal
drwxr-xr-x.  3 jtel jtel 4096 Jun 13 15:40 LogFiles
drwxr-xr-x.  3 jtel jtel 4096 Feb 10 12:49 LogFilesCall



Sicherstellung des Mounts

Crontab anpassen, sodass der Mount selbst wiederhergestellt wird, und somit die Boot-Reihenfolge der Systeme auch unwichtig ist:

Translations Ignore


Code Block
languagebash
titleSecuring the mount
cat <<EOFF >> /etc/crontab
*/1  *  *  *  * root bash -c "if [ ! -d /home/jtel/shared/Data/system ]; then mount /home/jtel/shared ; fi"
EOFF




Dies kann wie folgt getestet werden:

Translations Ignore


Code Block
languagebash
titleTesting ensuring the mount
ls /home/jtel/shared
(files are there and are listed)
 
umount /home/jtel/shared
ls /home/jtel/shared
(files are no longer there and are not listed)

... Wait up to one minute
 
ls /home/jtel/shared
(files are there and are listed)





Sv translation
languagefr

Table of Contents
maxLevel3
printablefalse

Introduction

Quelle que soit la fonction qu'un serveur doit remplir, à l'exception de MAGASIN (qui met la zone de données à sa disposition), la zone de données sera liée. La première VM à mettre en place devrait donc être le rôle MAGASIN.

Relier le zones de données

Tout d'abord, une connexion à l'espace commun de données est établie. Pour ce faire, le chemin du point de montage est créé à l'aide des commandes suivantes :

Translations Ignore


Code Block
titleConnecter Datastore - créer répertoire
mkdir /home/jtel/shared chown jtel:jtel /home/jtel/shared



La connexion est ensuite configurée dans le fichier /etc/fstab. Le fichier peut être édité avec un éditeur de texte. L'entrée suivante doit être insérée dans le fichier à titre d'exemple (remplacer le mot de passe par le mot de passe correspondant) :

Translations Ignore


Code Block
titleEntrée Supplémentaire dans / etc / fstab
cat <<EOFF >> /etc/fstab //acd-store/shared /home/jtel/shared cifs user=jtel,password=<password>,uid=jtel,gid=jtel,file_mode=0755,dir_mode=0755 0 0 EOFF



ATTENTION : pour connecter d'anciens partages de fichiers (SMB 1.0) sous CentOS 7.x, l'entrée suivante est nécessaire :

Translations Ignore


Code Block
titleEntrée Supplémentaire dans / etc / fstab
cat <<EOFF >> /etc/fstab //acd-store/shared /home/jtel/shared cifs user=jtel,password=<password>,uid=jtel,gid=jtel,file_mode=0755,dir_mode=0755,vers=1.0 0 0 EOFF



Le premier bloc de la ligne décrit l'UNC de la libération. Ici le nom de l'ordinateur (ici acd-lb) doit être adapté si nécessaire. Le troisième bloc contient, entre autres, les références pour le partage. Si un nom de domaine est également requis ici, il peut être ajouté avec un paramètre supplémentaire domain=DOMAINNAME séparées par des virgules. S'il est souhaité, pour des raisons de sécurité, de ne pas stocker les informations d'identification dans le fichier /etc/fstab, qui, pour des raisons liées au système, n'a pas de restrictions de lecture particulières, elles peuvent être stockées dans un fichier séparé. Un tel fichier aurait alors le format suivant (remplacer le mot de passe par le mot de passe approprié) :

Translations Ignore


Code Block
titleFichier avec données d'accès séparées
domain=MYDOMAIN username=jtel password=<password>



Ce dossier peut être placé dans n'importe quel endroit utile (par exemple root la répértoire « home » ou dans la répértoire /etc) et peut avoir un accès en lecture seule à la racine. En supposant qu'un tel fichier soit nommé /etc/jtel-credentials, les permissions du fichier sont sécurisées par les commandes suivantes :

Translations Ignore


Code Block
languagebash
titleSauvegarde du fichier de données d'accès
chown root:root /etc/jtel-credentials chmod 400 /etc/jtel-credentials



Dans le dossier /etc/fstab l'entrée ressemblerait alors à ceci

Translations Ignore


Code Block
titleEntrée sécurisée dans / etc / fstab
//acd-store/shared /home/jtel/shared cifs credentials=/etc/jtel-credentials,uid=jtel,gid=jtel,file_mode=0755,dir_mode=0755 0 0



ATTENTION : pour connecter d'anciens partages de fichiers (SMB 1.0) sous CentOS 7.x, l'entrée suivante est nécessaire :

Translations Ignore


Code Block
titleEntrée sécurisée dans / etc / fstab
//acd-store/shared /home/jtel/shared cifs credentials=/etc/jtel-credentials,uid=jtel,gid=jtel,file_mode=0755,dir_mode=0755,vers=1.0 0 0




Après avoir configuré la connexion, le partage peut maintenant être montée. Cela se fait avec la commande :

Translations Ignore


Code Block
languagebash
titleConnectez le partage
mount /home/jtel/shared



Après la connexion, un court test montre que les fichiers sont accessibles :

Translations Ignore


Code Block
titleAccèder test
[root@acd-db2 ~]# ls -la /home/jtel/shared/ total 52 drwxr-xr-x. 9 jtel jtel 4096 Mar 30 10:35 . drwx------. 6 jtel jtel 4096 Jun 12 17:03 .. drwxr-xr-x. 5 jtel jtel 4096 Mar 22 12:13 Data drwxr-xr-x. 4 root root 4096 Jun 14 08:37 Import drwxr-xr-x. 7 jtel jtel 4096 Jun 13 15:37 JTEL drwxr-xr-x. 16 jtel jtel 4096 Mar 23 15:55 JTELCarrierPortal drwxr-xr-x. 3 jtel jtel 4096 Jun 13 15:40 LogFiles drwxr-xr-x. 3 jtel jtel 4096 Feb 10 12:49 LogFilesCall



Sécuriser le montage

Ajustez la crontab pour que le montage lui-même soit restauré, de sorte que l'ordre de démarrage des systèmes ne soit pas important :

Translations Ignore


Code Block
languagebash
titleSécuriser la monture
cat <<EOFF >> /etc/crontab */1 * * * * root bash -c "if [ ! -d /home/jtel/shared/Data/system ]; then mount /home/jtel/shared ; fi" EOFF




Cela peut être testé comme suit :

Translations Ignore


Code Block
languagebash
titleTester pour s'assure la monture
ls /home/jtel/shared (files are there and are listed)   umount /home/jtel/shared ls /home/jtel/shared (files are no longer there and are not listed) ... Wait up to one minute   ls /home/jtel/shared (files are there and are listed)