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 Stepsjtel UserCreate jtel UserCreate the jtel user, and add to the group wheel, which allows the user to run commands with sudo.
Configure wheelThe following command creates a configuration file allowing all users who are members of the wheel group to run commands as root with sudo.
Warning when using git as rootThe following command makes it (intentionally) more difficult to use git as the root user.
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 chronydThe 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.
Check chronyd
Remove Anacron, Install CronThe 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.
Install Hypervisor ToolsThe 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.
Detect the Hypervisor
VMWareThe tools are installed as follows:
Hyper-V
Other HypervisorsConsult the manufacturer for further detals. Hosts FileThe 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).
The hosts file is located in: /etc/hosts Example Hosts File Single DB
Example Hosts File Master-Slave
Example Hosts File Redundant
Optional StepsSSH KeysSSH keys can be added, to enable login to the jtel user via an ssh key.
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).
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.
|
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:
|