This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
networking:linux:linux_time [2012/02/03 10:15] 127.0.0.1 external edit |
networking:linux:linux_time [2021/01/16 21:15] (current) gcooper |
||
---|---|---|---|
Line 5: | Line 5: | ||
ntpq -p | ntpq -p | ||
- | |||
- | ntptrace pool.ntp.org | ||
ntpstat | ntpstat | ||
- | cat / | + | grep ntp /var/log/messages |
+ | </ | ||
+ | |||
+ | ===== Ubuntu ===== | ||
+ | |||
+ | https:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | :!: '' | ||
+ | |||
+ | < | ||
+ | timedatectl set-timezone America/ | ||
+ | |||
+ | timedatectl status | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | systemctl restart systemd-timesyncd.service | ||
+ | </ | ||
+ | |||
+ | ===== CentOS ===== | ||
+ | |||
+ | Here we: | ||
+ | |||
+ | - Set the correct timezone | ||
+ | - Set the actual time | ||
+ | - Set the NTP daemon | ||
+ | - Start the NTP daemon | ||
+ | - Verify the NTP daemon is working properly | ||
+ | |||
+ | < | ||
+ | rm / | ||
+ | |||
+ | ln -s / | ||
+ | |||
+ | ntpdate pool.ntp.org | ||
+ | |||
+ | chkconfig ntpd on | ||
+ | service ntpd start | ||
- | zcat /var/log/daemon.log.1.gz |grep ntp | + | tail /var/log/messages |
</ | </ | ||
Line 21: | Line 58: | ||
< | < | ||
cat / | cat / | ||
+ | </ | ||
+ | |||
+ | ===== Ubuntu ===== | ||
+ | |||
+ | < | ||
+ | sudo apt-get install ntp | ||
+ | |||
+ | sudo service ntp restart | ||
</ | </ | ||
Line 28: | Line 73: | ||
Edit / | Edit / | ||
- | < | ||
+ | < | ||
vi / | vi / | ||
Line 48: | Line 93: | ||
===== NTP Servers ===== | ===== NTP Servers ===== | ||
+ | < | ||
0.us.pool.ntp.org | 0.us.pool.ntp.org | ||
1.us.pool.ntp.org | 1.us.pool.ntp.org | ||
2.us.pool.ntp.org | 2.us.pool.ntp.org | ||
3.us.pool.ntp.org | 3.us.pool.ntp.org | ||
+ | </ | ||
===== Local Network Server ===== | ===== Local Network Server ===== | ||
Line 58: | Line 105: | ||
< | < | ||
- | vim / | + | vim / |
# Hosts on local network are less restricted. | # Hosts on local network are less restricted. | ||
Line 65: | Line 112: | ||
</ | </ | ||
+ | < | ||
sudo service ntpd restart | sudo service ntpd restart | ||
+ | </ | ||
+ | |||
+ | ===== Public Server ===== | ||
+ | |||
+ | https:// | ||
===== Firewall ===== | ===== Firewall ===== |