Sv translation | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||
IntroductionThe following steps are performed after OS installation, before a specific ROLE is configured. Cloud Variants
System UpdateUpdate the system to the newest patch release and install basic packages. Note, if this fails due to a proxy server being present, skip this step and create the jtel user first. Then configure the proxy as shown here.
If a new kernel is installed, then a reboot is required.
Mandatory Steps | ||||||||||||||||||||||||||||||||||||||||||||||||
reboot |
Status | ||||
---|---|---|---|---|
|
Translations Ignore | |||||||
---|---|---|---|---|---|---|---|
|
SSH Schlüssel eintragen
Als nächstes werden die SSH-Schlüssel der jtel-Projekt-Techniker eingetragen, so dass ein gesichertes Login ohne separate Passworteingabe möglich wird. Standardmäßig existiert im Home-Verzeichnis von root
weder das SSH-Konfigurationsverzeichnis noch die entsprechende Konfigurationsdatei. Dies alles wird mit den Befehlen im Nachfolgenden Code-Block erzeugt:
Code Block | ||||
---|---|---|---|---|
| ||||
mkdir -p /home/jtel/.ssh
cat << EOFF > /home/jtel/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAgJWox9vkWssx24V6m+VB/9cfFUznUnVJqHeSnQFcE+ANzH+lgv90jQYXRf8XLSaKA4HZGO7SFUwLz7eNHk0lIS+TG+WKGrjl3GRvzNoYVAapeKUV7HjbeagQPNOCKTr6G8Vi/GVMyOx8XhJAgpr5gjyW9GdMdqnOS9uxd83BCh/UiAP9oVUbLiIIxbtmLAzyfJdjnbFP9sJXw96Vl040Fe4aoLofrkPyPu7cst6TPJx5myDhORG31nD/2iwUNLfv58m9ABMsePfhqzSp/Hi2XY/e5gikDh3xUxoBmL9fWwbiFb92AFW08rP1CtoCEtOe2nJkdtRzt0GiE+A+zgdDjw== support@jtel.de
ssh-rsa AAAAB3NzaC1yc2EAAAABJ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vHIRAOfehmG1xFtfk+rGPmgiblPWWWklKYQUfMnHI0pqFJwrPW46nqdUlQwtknATZC2cuKe931zstFhuDsm218yS4hTTlcjw5i/DH7PFr9Y58BtY6ZTy8khwTUeMPpSxE7i2WYoqoJ7DXcw== sou@jtel.de
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEA0czZLbpaxo/EY9iHDq9n6EWTALeYB7GVmp/mLwp66zeV4DbvTm+3FDUJSD9rqMJzJkAAEicFe+II/ZdIeZzG4JdYf66M/Y6k0w0Y8jJqDtsdgUf3OJ1hJ53Z+BwFqy1vD/a7N2hxlEKD2rzyAfVb+xzTzhJTjpX1kNiUxDMXRZs4ytW0CbOqZSpTJ3eT9NS9gH188KFTvHN8rPzDAxRKcexO2fSzNa7e+dYsfImOQoYlxFBX5YU74Ay9F5b7K95Cxe8EstvKNVmjkNWgnNWuS2d7eabepC1jv3z0FdOGiVoZ1SDgqKz8ysBa6Rzkt5L5peHYAKyH8TedeUk7kRIwZQ== dhia@jtel.de
EOFF
restorecon -R -v /home/jtel/.ssh
chown -R jtel:jtel /home/jtel/.ssh
chmod 0700 /home/jtel/.ssh
chmod 0644 /home/jtel/.ssh/authorized_keys |
Configure wheel
The following command creates a configuration file allowing all users who are members of the wheel group to run commands as root with sudo.
Translations Ignore | |||||
---|---|---|---|---|---|
|
Warning when using git as root
The following command makes it (intentionally) more difficult to use git as the root user.
Translations Ignore | |||||
---|---|---|---|---|---|
|
Configure Chrony (NTP)
Chrony is a newer (better) replacement for ntpd. It is configured in a similar way, however the commands used to check the synchronisation are slightly different.
For further information, check out this link: https://opensource.com/article/18/12/manage-ntp-chrony
Setup chronyd
The following commands modify the basic chrony.conf file to remove usage of the default pool and any configured servers, and replace this with the 3 (very reliable) time servers from the German PTB.
translations |
---|
Hinweis: alle anderen SSH keys nicht mehr verwenden.
Damit diese auch korrekt funktionieren, müssen die SELINUX-Security-Labels korrekt angepasst werden. Dies erledigt der Befehl am Ende des Code-Blocks.
History Funktion verbessern
Der Nachfolgende Befehl generiert eine Konfigurationsdatei zur Verbesserung der History-Funktion der Shell:
translations-ignore | |||||||
---|---|---|---|---|---|---|---|
|
Screen Multiplexer verbessern
Der Nachfolgende Befehl verbessert die Darstellung des screen-Multiplexers.
Code Block | ||||
---|---|---|---|---|
| ||||
cat <<EOFF >> /etc/screenrc
# JTEL:Added
startup_message off
vbell off
hardstatus alwayslastline "%{kw} %{b}%H%{K} < %-w%{Wb} %n %t %{-}%+w >"
# This lets work all functions keys in midnight commander
# termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
EOFF
|
|
Check chronyd
translations |
---|
Wheel (sudo) Konfiguration
Der Nachfolgende Befehl erzeugt eine Konfigurationskomponente, um den Benutzern der Gruppe wheel
das Recht zu geben, Befehle als root
mittels des Tools sudo
auszuführen:
translations-ignore | |||||||
---|---|---|---|---|---|---|---|
|
Shell Konfiguration auf jtel übertragen
Die nachfolgende Befehle replizieren die Shell-Konfiguration vom Benutzer root
in den Benutzer jtel
:
|
Remove Anacron, Install Cron
The jtel system requires that cron jobs are performed at a particular time. jtel servers will usually run continuously. The anacron service (which is installed by default) may run a cron job later if the machine has been powered off. However, on a jtel system there is no point doing this, and sometimes this can be destructive.
Therefore the anacron service is removed and replaced with the normal cron service.
Code Block | ||||
---|---|---|---|---|
| ||||
cp -a /root/.inputrc /home/jtel
chown -R jtel:jtel /home/jtel/.inputrc
|
Root hinweis für GIT
Die nachfolgende Befehle machen das Ausführen von GIT als root schwieriger, da dies immer im Kontext vom jtel user geschehen soll:
Translations Ignore | |||||||
---|---|---|---|---|---|---|---|
|
SSH Keys auf root übertragen
Die nachfolgende Befehle replizieren die SSH Keys vom Benutzerjtel
in den Benutzer root
:
|
Install Hypervisor Tools
The hypervisor tools make support from the hypervisor console better, when performing operations such as snapshots, starting and stopping and resetting the virtual machine. It is important that the correct tools are installed.
Warning |
---|
Note: you will not need to and should not do this in most cloud environments! |
Detect the Hypervisor
Code Block | ||
---|---|---|
| ||
virt-what |
VMWare
The tools are installed as follows:
Translations Ignore | |||||
---|---|---|---|---|---|
|
Hyper-V
Translations Ignore | |||||||
---|---|---|---|---|---|---|---|
|
NTP auf PTB einstellen
Die nachfolgende Befehle tragen die offiziellen Zeitserver der Physikalisch-Technischen-Bundesanstalt in die Konfigurationsdatei des Zeitsynchonisationsdienstes ein, konfigurieren den Dienst so, dass er automatisch startet, synchronisieren die Zeit einmalig mit einem der PTB-Server und starten den Dienst.
|
Other Hypervisors
Consult the manufacturer for further detals.
Hosts File
The jtel system uses aliases to reference the other machines in the installation. This removes all dependencies to cryptic host names, and customer DNS servers.
The hosts file must be provided on each system, and should contain aliases pointing to the following machines (red entries are not required).
Alias | Signifies | Single DB Installation | Master-Slave Installation | Redundant Master-Master Installation |
---|---|---|---|---|
acd-dbm | Database Master | The database machine. | The database master. | The Load Balancer Virtual Shared IP Address. |
acd-dbm1 | First Database Master | The first database master. | ||
acd-dbm2 | Second Database Master | The second database master. | ||
acd-dbs | Database Slave | The database machine. | The database slave. | The Load Balancer Virtual Shared IP Address. |
acd-dbs1 | First Database Slave | The first database slave. | ||
acd-dbs2 | Second Database Slave | The second database slave. | ||
acd-dbr | Reporting Database | The database machine. | The database slave. | The Load Balancer Virtual Shared IP Address. |
acd-lb | The Load Balancer | The Load Balancer | The Load Balancer | The Load Balancer Virtual Shared IP Address. |
acd-store | The File Storage | The Load Balancer | The Load Balancer | The Load Balancer Virtual Shared IP Address. |
acd-tel1 | The Telephony Machine(s) Numbered from 1 ... N | The Telephony Machine(s) Numbered from 1 ... N | The Telephony Machine(s) Numbered from 1 ... N | The Telephony Machine(s) Numbered from 1 ... N |
acd-jb1 | The Webserver Machine(s) Numbered from 1 ... N | The Webserver Machine(s) Numbered from 1 ... N | The Webserver Machine(s) Numbered from 1 ... N | The Webserver Machine(s) Numbered from 1 ... N |
Example Hosts File Single DB
Translations Ignore | ||
---|---|---|
|
Example Hosts File Master-Slave
Translations Ignore | ||
---|---|---|
|
Example Hosts File Redundant
Translations Ignore | ||
---|---|---|
|
Optional Steps
SSH Keys
SSH keys can be added, to enable login to the jtel user via an ssh key.
Code Block | ||||
---|---|---|---|---|
| ||||
sed -i -e "s/^server 0.centos.pool.ntp.org iburst$/server ptbtime1.ptb.de iburst\nserver ptbtime2.ptb.de iburst\nserver ptbtime3.ptb.de iburst\nserver 0.centos.pool.ntp.org iburst/" /etc/ntp.conf
chkconfig ntpd on
ntpdate ptbtime2.ptb.de
service ntpd start
|
NTP Prüfen
Siehe hier:
für eine Erklärung.
Code Block | ||||
---|---|---|---|---|
| ||||
ntpq -p |
Deinstallation anacron, Installation cron
Da der anacron Dienst stehen bleibt, wenn einer der Wartungsskripte nicht durchläuft, wird dieser deinstalliert, und der cron dienst installiert:
Code Block | ||||
---|---|---|---|---|
| ||||
sudo yum -y install cronie-noanacron
sudo yum -y remove cronie-anacron |
VMWare / Hyper-V / Virtualisierungs-Tools (NICHT BEI AZURE)
VMWare Tools installieren
Code Block | ||||
---|---|---|---|---|
| ||||
yum -y install open-vm-tools |
Hyper-V
Code Block | ||||
---|---|---|---|---|
| ||||
yum -y install hyperv-daemons |
Andere Virtualisierungsumgebungen
Den jeweiligen Hersteller kontaktieren.
Proxy Server Eintrag
Falls ein Proxyserver verwendet wird, dann folgende Befehle nutzen um dies für root und den jtel user einzurichten - die oberen Zeilen bitte anpassen:
Code Block | ||||
---|---|---|---|---|
| ||||
PROXY_USERNAME=
PROXY_PASSWORD=
PROXY_SERVER=proxy.example.de
PROXY_PORT=3128
PROXY_EXCEPTIONS=.example.de,.local,10.200.21.
if [ -n "$PROXY_USERNAME" ] && [ -n "$PROXY_PASSWORD" ]
then
PROXY="http://$USERNAME:$PASSWORD@$PROXY_SERVER:$PROXY_PORT"
elif [ -n "$PROXY_USERNAME" ]
then
PROXY="http://$USERNAME@$PROXY_SERVER:$PROXY_PORT"
else
PROXY="http://$PROXY_SERVER:$PROXY_PORT"
fi
cat <<EOFF >> ~/.bashrc
export ALL_PROXY=$PROXY
export HTTP_PROXY=$PROXY
export HTTPS_PROXY=$PROXY
export FTP_PROXY=$PROXY
export RSYNC_PROXY=$PROXY
export http_proxy=$PROXY
export https_proxy=$PROXY
export ftp_proxy=$PROXY
export rsync_proxy=$PROXY
export NO_PROXY=$PROXY_EXCEPTIONS
EOFF
cat <<EOFF >> /home/jtel/.bashrc
export ALL_PROXY=$PROXY
export HTTP_PROXY=$PROXY
export HTTPS_PROXY=$PROXY
export FTP_PROXY=$PROXY
export RSYNC_PROXY=$PROXY
export http_proxy=$PROXY
export https_proxy=$PROXY
export ftp_proxy=$PROXY
export rsync_proxy=$PROXY
export NO_PROXY=$PROXY_EXCEPTIONS
EOFF
source ~/.bashrc
|
Sicherstellen der Namensauflösung
Die Datei /etc/hosts editieren, und die entsprechenden Namen der verschiednen Rechner für die Lösung eintragen:
Translations Ignore | ||||||||
---|---|---|---|---|---|---|---|---|
|
Note, login by ssh key only must be enabled (this is not discussed here, and a word of caution - make sure you have recorded the root password before you do this so at least you can access the machine via the console).
Anchor | ||||
---|---|---|---|---|
|
If a proxy server is used, the following commands will configure the proxy server for root and the jtel user. The top 5 lines should be modified.
Status | ||||
---|---|---|---|---|
|
Translations Ignore | |||||
---|---|---|---|---|---|
|
Sv translation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The following steps are performed after OS installation, before a specific ROLE is configured. Azure CloudFor Azure Cloud installations, a user is specified when the VM is created. The root password remains hidden. It is, however, possible to change to root using the following command, using the user's own password:
Additionally, it is necessary to configure the network card(s) in a particular Zone. This is performed by editing the network configuration file(s):
Todo .... from hereOld: System UpdateUpdate the system to the newest patch release and install basic packages
Reboot
ipv6 Disabeln
GrundkonfigurationSicherstellen, dass firewalld läuft (Benötigt für Azure Cloud Installation) Die nachfolgende Befehle stellen sicher, dass firewalld läuft;
User jtel erzeugen Die nachfolgende Befehle erzeugen den Benutzer
SSH Schlüssel eintragen Als nächstes werden die SSH-Schlüssel der jtel-Projekt-Techniker eingetragen, so dass ein gesichertes Login ohne separate Passworteingabe möglich wird. Standardmäßig existiert im Home-Verzeichnis von
Hinweis: alle anderen SSH keys nicht mehr verwenden. Damit diese auch korrekt funktionieren, müssen die SELINUX-Security-Labels korrekt angepasst werden. Dies erledigt der Befehl am Ende des Code-Blocks. History Funktion verbessern Der Nachfolgende Befehl generiert eine Konfigurationsdatei zur Verbesserung der History-Funktion der Shell:
Screen Multiplexer verbessern Der Nachfolgende Befehl verbessert die Darstellung des screen-Multiplexers.
Wheel (sudo) Konfiguration Der Nachfolgende Befehl erzeugt eine Konfigurationskomponente, um den Benutzern der Gruppe
Shell Konfiguration auf jtel übertragen Die nachfolgende Befehle replizieren die Shell-Konfiguration vom Benutzer
Root hinweis für GIT Die nachfolgende Befehle machen das Ausführen von GIT als root schwieriger, da dies immer im Kontext vom jtel user geschehen soll:
SSH Keys auf root übertragen Die nachfolgende Befehle replizieren die SSH Keys vom Benutzer
NTP auf PTB einstellen Die nachfolgende Befehle tragen die offiziellen Zeitserver der Physikalisch-Technischen-Bundesanstalt in die Konfigurationsdatei des Zeitsynchonisationsdienstes ein, konfigurieren den Dienst so, dass er automatisch startet, synchronisieren die Zeit einmalig mit einem der PTB-Server und starten den Dienst.
NTP Prüfen Siehe hier: für eine Erklärung.
Deinstallation anacron, Installation cron Da der anacron Dienst stehen bleibt, wenn einer der Wartungsskripte nicht durchläuft, wird dieser deinstalliert, und der cron dienst installiert:
VMWare / Hyper-V / Virtualisierungs-Tools (NICHT BEI AZURE) VMWare Tools installieren
Hyper-V
Andere VirtualisierungsumgebungenDen jeweiligen Hersteller kontaktieren. Proxy Server EintragFalls ein Proxyserver verwendet wird, dann folgende Befehle nutzen um dies für root und den jtel user einzurichten - die oberen Zeilen bitte anpassen:
Sicherstellen der Namensauflösung Die Datei /etc/hosts editieren, und die entsprechenden Namen der verschiednen Rechner für die Lösung eintragen:
|