Nethence Newdoc Olddoc Lab Your IP BBDock  

Time Setup

Warning: running ntp is not required for XEN guests as those are synced with the dom0. Only the timezone need to be set up

ru

#ln -sf /usr/share/zoneinfo/Europe/Moscow /etc/localtime

server 0.ru.pool.ntp.org iburst
server 1.ru.pool.ntp.org iburst
server 2.ru.pool.ntp.org iburst
server 3.ru.pool.ntp.org iburst

fr

#ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime

#server ntp.obspm.fr iburst prefer
#server ntp1.dedibox.fr iburst

ubuntu

apt install nmap netcat ntpdate ntp ntpstat

dpkg-reconfigure tzdata
cat /etc/timezone
ls -lhF /etc/localtime*

#echo 'Europe/Moscow' > /etc/timezone
#echo 'Europe/Paris' > /etc/timezone

ntpsrv=0.ru.pool.ntp.org
ping -c1 $ntpsrv
nmap -sU -p123 $ntpsrv

systemctl stop ntp
ntpdate -u $ntpsrv
hwclock --systohc

mv -i /etc/ntp.conf /etc/ntp.conf.dist
sed '/^$/d;/^#/d;' /etc/ntp.conf.dist > /etc/ntp.conf
vi /etc/ntp.conf

# pool ...
server 0.ru.pool.ntp.org iburst
server 1.ru.pool.ntp.org iburst
server 2.ru.pool.ntp.org iburst
server 3.ru.pool.ntp.org iburst

#vi /etc/systemd/timesyncd.conf

systemctl start ntp
systemctl enable ntp

note. dhclient settings my override those.

slackware

ls -lhF /etc/localtime*

ntpsrv=0.ru.pool.ntp.org
ping -c1 $ntpsrv
nmap -sU -p123 $ntpsrv

/etc/rc.d/rc.ntpd stop
ntpdate -u 0.ru.pool.ntp.org
hwclock --systohc

mv -i /etc/ntp.conf /etc/ntp.conf.dist
sed '/^$/d;/^#/d;' /etc/ntp.conf.dist > /etc/ntp.conf
vi /etc/ntp.conf

server 0.ru.pool.ntp.org iburst
server 1.ru.pool.ntp.org iburst
server 2.ru.pool.ntp.org iburst
server 3.ru.pool.ntp.org iburst

/etc/rc.d/rc.ntpd start

ready to go

timedatectl status
ntpstat
ntpq -pn

notes / refs.

additional notes

eventually add -x (Slew up to 600 seconds.) to the ntpd daemon arguments.


Home | GitHub | Docker Hub | Donate | Contact