Search Suggest

install ntp ntpdate Time server

sudo apt-get install ntp ntpdate
# cp /etc/ntp.conf /etc/ntp.conf.bak
#vim /etc/ntp.conf
-------------------------------------------------------------
1.# Add log file
logfile /var/log/ntp.log
2.# Specify one or more NTP servers. (For server Thailand)
server time.navy.mi.th dynamic
server time.nist.gov dynamic
server clock.nectec.or.th dynamic
3.# Loclal clock and Backup
server 127.127.1.0      # local clock
fudge 127.127.1.0 stratum 10
4.# Add network
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap
restrict 172.16.106.0 mask 255.255.255.0 nomodify notrap
---------------------------Save & exit---------------------------

#/etc/init.d/ntp restart
#ntpq -pn 


#ntpdc -c sysinfo


Đăng nhận xét