1: Experimental environment
Prerequisites: Virtual machine environment, Windows client, shutdown firewall, linux Server shut down firewall, turn off SELinux.
Cent OS:NTP Server ip:192.168.80.134/255.255.255.0
Windows 7: Client ip:192.168.80.133/255.255.255.0
2:NTP Service Installation
① generally comes with:
1 grep NTP 2 ntp-4.2. 6p5-1. el6.centos.x86_643 fontpackages-filesystem-1.41 -1.1. El6.noarch4 ntpdate-4.2. 6p5-1. el6.centos.x86_ 64
② if not, this installation
㈠RPM Installation:
RPM-IVH ntp-*.rpm
Unloading:
Rpm-e ntp-*.rpm
㈡yum Installation
Yum-y Install ntp.i*
Unloading:
Yum-y Remove ntp.i*
3: Service configuration:
①: vi/etc/ntp.conf
1Restrict 192.168.80.0 mask 255.255.255.0 nomodify notrap2 3 # Use public servers from the pool.ntp.org project.4# Consider joining the pool (http://www.pool.ntp.org/join.html).5#server0. centos.pool.ntp.org Iburst6#server1. centos.pool.ntp.org Iburst7#server2. centos.pool.ntp.org Iburst8#server3. centos.pool.ntp.org Iburst9 Server asia.pool.ntp.org
1 /etc/rc.d/init.d/ntpd start
1 chkconfig ntpd on
②: Change the time zone:
Tzselect:
Execute the tzselect command--Select asia--> Select china--> Select East China-beijing, Guangdong, Shanghai, etc--> and enter 1;
Execute tz= ' Asia/shanghai '; Export TZ and add this line of command to the. Profile, then exit and log back in.
Reference: http://jingyan.baidu.com/article/fa4125acb7328628ac70920e.html
③ Manual Update:
Ntpdate asia.pool.ntp.org
④ View the synchronization of this machine with the upper NTP server:
Ntpq-p
At this point: the NTP itself is synchronized properly and then set the client
⑤ Change the IP address of the Windows Synchronization server to the NTP server IP that was built, and update the time immediately.
Finally: The simple construction of the NTP server, the implementation of the basic functions.
NTP Service Setup