This is an old revision of the document!
ntpdate pool.ntp.org ntpq -p ntptrace pool.ntp.org ntpstat cat /var/log/daemon.log|grep ntp zcat /var/log/daemon.log.1.gz |grep ntp
Here we:
rm /etc/localtime ln -s /usr/share/zoneinfo/America/Phoenix /etc/localtime ntpdate pool.ntp.org chkconfig ntpd on service start ntpd tail /var/log/messages
Already functions as NTP server.
cat /var/log/ntpd/current |tai64nlocal
Setting a local time server may noticeably speed up boot times.
Edit /etc/ntp.conf and add a line for your preferred server:
vi /etc/ntp.conf server 192.168.2.1 prefer
If the initscripts run ntpdate, you can replace /etc/ntp/step-tickers:
sudo cp -a /etc/ntp/step-tickers /etc/ntp/step-tickers.orig sudo vim /etc/ntp/step-tickers 192.168.2.1
0.us.pool.ntp.org 1.us.pool.ntp.org 2.us.pool.ntp.org 3.us.pool.ntp.org
Edit the config file, uncomment and modify:
vim /etc/ntp.conf # Hosts on local network are less restricted. restrict 192.168.2.0 mask 255.255.255.0 nomodify notrap broadcast 192.168.2.255
sudo service ntpd restart
Open UDP port 123 on the firewall:
http://www.ghidinelli.com/2008/09/25/iptables-firewall-rules-for-ntpd-time-synchronization
/sbin/iptables -A INPUT -p udp -s 192.168.30.0/24 --dport 123 -j ACCEPT /sbin/iptables -A OUTPUT -p udp --sport 123 -j ACCEPT service iptables save
or:
system-config-securitylevel-tui 123:udp netstat -uapn|grep 123