This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
networking:linux:linux_time [2012/02/17 08:40] gcooper |
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 /var/log/daemon.log|grep ntp | + | grep ntp /var/log/messages |
+ | </ | ||
- | zcat /var/log/daemon.log.1.gz |grep ntp | + | ===== Ubuntu ===== |
+ | |||
+ | https://linuxconfig.org/how-to-change-timezone-on-ubuntu-18-04-bionic-beaver-linux | ||
+ | |||
+ | https:// | ||
+ | |||
+ | :!: '' | ||
+ | |||
+ | < | ||
+ | timedatectl set-timezone America/ | ||
+ | |||
+ | timedatectl status | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | systemctl restart systemd-timesyncd.service | ||
</ | </ | ||
===== CentOS ===== | ===== CentOS ===== | ||
- | Set the correct time zone: | + | Here we: |
+ | |||
+ | - Set the correct | ||
+ | - Set the actual | ||
+ | - Set the NTP daemon to automatically start on system boot | ||
+ | - Start the NTP daemon | ||
+ | - Verify the NTP daemon is working properly | ||
< | < | ||
Line 25: | Line 45: | ||
ntpdate pool.ntp.org | ntpdate pool.ntp.org | ||
+ | |||
+ | chkconfig ntpd on | ||
+ | service ntpd start | ||
+ | |||
+ | tail / | ||
</ | </ | ||
Line 33: | Line 58: | ||
< | < | ||
cat / | cat / | ||
+ | </ | ||
+ | |||
+ | ===== Ubuntu ===== | ||
+ | |||
+ | < | ||
+ | sudo apt-get install ntp | ||
+ | |||
+ | sudo service ntp restart | ||
</ | </ | ||
Line 40: | Line 73: | ||
Edit / | Edit / | ||
- | < | ||
+ | < | ||
vi / | vi / | ||
Line 60: | 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 70: | Line 105: | ||
< | < | ||
- | vim / | + | vim / |
# Hosts on local network are less restricted. | # Hosts on local network are less restricted. | ||
Line 77: | Line 112: | ||
</ | </ | ||
+ | < | ||
sudo service ntpd restart | sudo service ntpd restart | ||
+ | </ | ||
+ | |||
+ | ===== Public Server ===== | ||
+ | |||
+ | https:// | ||
===== Firewall ===== | ===== Firewall ===== |