#-Road-Map--------------------------------- # # NTP-Server # # Datum: Jan. 2026 (Geprüft) # # Eine "Strassenkarte" ist eine simple Text-Datei, # welche die Befehle zum kopieren und einfügen # im CLI oder auf dem Desktop bereitstellt und # zusätzlich einem einen Grobablauf einer Installation aufzeigt. #------------------------------------------ #------------------------------------------ # SSH-Verbindung #------------------------------------------ ssh DEINUSER@192.168.1.X #------------------------------------------ # System-Update / -Upgrade #------------------------------------------ sudo apt update sudo apt upgrade -y sudo apt autoclean sudo apt autoremove #------------------------------------------ # Statische IP Adresse #------------------------------------------ ip addr sudo su cd /etc/netplan ls for i in $( ls ); do mv $i $i.bak; done touch /etc/netplan/01_static_ip.yaml nano /etc/netplan/01_static_ip.yaml # Adapter-Einstellungen (Ctrl + O und Ctrl + X zum speichern) network: version: 2 renderer: networkd ethernets: ens18: #Edit this line according to your network interface name. dhcp4: no addresses: - 192.168.1.150/24 gateway4: 192.168.1.1 nameservers: addresses: - 8.8.8.8 - 8.8.4.4 netplan generate && netplan apply # Verbindung wird unterbrochen, Fenster schliessen # und erneut mit der neuen IP einloggen #------------------------------------------ # Hostnamen festlegen #------------------------------------------ ssh DEINUSER@192.168.1.X sudo hostnamectl set-hostname DEINHOSTNAME sudo nano /etc/hosts # Host-Datei (Ctrl + O und Ctrl + X zum speichern) 127.0.0.1 localhost 127.0.1.1 DEINHOSTNAME ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters sudo reboot #------------------------------------------ # Installation und Einstellungen #------------------------------------------ ssh DEINUSER@192.168.1.X sudo apt install ntp -y sudo systemctl enable ntp.service sudo nano /etc/ntp.conf # NTP-Datei (Ctrl + O und Ctrl + X zum speichern) # Specify one or more NTP servers. # Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board # on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for # more information. pool 0.ubuntu.pool.ntp.org iburst pool 1.ubuntu.pool.ntp.org iburst pool 2.ubuntu.pool.ntp.org iburst pool 3.ubuntu.pool.ntp.org iburst # Use Ubuntu's ntp server as a fallback. pool ntp.ubuntu.com sudo systemctl restart ntp.service #------------------------------------------ # Systembedienung & Wissenswertes #------------------------------------------ sudo systemctl start restart ntp.service sudo systemctl restart ntp.service sudo systemctl stop ntp.service sudo nano /etc/ntp.conf cat /usr/share/zoneinfo/leap-seconds.list cat /var/lib/ntp/ntp.drift sudo apt install nmap -y && nmap localhost man ntp.conf date sudo apt install ntpdate sudo ntpdate 192.168.x.x sudo ntpdate -u 192.168.x.x sudo apt install ntpstat && ntpstat ntpq -p $> ntpq ntpq> sysinfo associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync, system peer: 193.134.29.11:123 system peer mode: client leap indicator: 00 stratum: 2 log2 precision: -25 root delay: 28.354 root dispersion: 17.871 reference ID: 193.134.29.11 reference time: ead5d1ab.458a0f98 Wed, Nov 6 2024 12:29:47.271 system jitter: 7.714009 clock jitter: 1.837 clock wander: 0.333 broadcast delay: -50.000 symm. auth. delay: 0.000 ntpq> quit $>