Deploy an internal NTP time server
Deploy the internal NTP time server, assuming that node0 is the master node of the NTP time server, node1 and node2 are both ntp client slave nodes, and the internal network segment is 10.10.75.0.
All nodes install ntp through the yum command, as follows: yum install ntp.
Modify the configuration file / etc/ntp.conf of node0 node
The contents are as follows:
Server 0.cn.pool.ntp.org
Server 0.asia.pool.ntp.org
Server 3.asia.pool.ntp.org
Restrict 0.cn.pool.ntp.org nomodify notrap noquery
Restrict 0.asia.pool.ntp.org nomodify notrap noquery
Restrict 3.asia.pool.ntp.org nomodify notrap noquery
All servers in the # 10.10.75.0 network segment can use the NTP server to synchronize time.
Restrict default ignore
Restrict 10.10.75.0 mask 255.255.255.0 notrap nomodify
Server 127.127.1.0 prefer
Fudge 127.127.1.0 stratum 10
3. On the node1, node2 node, edit / etc/ntp.conf
Add a server NTP time synchronization server IP address prefer
4. All nodes start the ntp service and set the ntp service to boot automatically, with the following command
Service ntpd start
Chkconfig ntpd on
The slave node first uses ntpdate to manually synchronize the time command as follows: ntpdate-u master node IP address