6.NTP

####config NTP client on centos 
yum install ntp
vim /etc/ntp.conf
#add line: server [NTPserverIP] 
service ntpd restart
chkconfig ntpd on
ntpq -p
ntpdate -u [NTPserverIP]

####config NTP server
#edit iptables
#-A INPUT -p udp --dport 123 -m iprange --src-range xx.xx.10.1-xx.xx.10.50 -j ACCEPT
vim /etc/sysconfig/iptables
service iptables reload

#############################################################
####config NTP client on windows server 
sc start w32time
sc config "w32time" start= auto

w32tm /config /update /manualpeerlist:"xx.xx.10.137,xx.xx.10.138"
w32tm /query /peers
w32tm /query /configuration

w32tm /resync
#check time zone
w32tm /tz

Last updated