Three servers time synchronization -Linux

192.168.1.30 do server time

192.168.1.40 synchronization 30

192.168.1.50 synchronization 30

step1. 30 on the machine modified ntp.conf

Add to:

restrict  192.168.1.0 mask  255.255.255.0  nomodify notrap

Description: The ah according to their own

Logout:

#server 0.rhel.pool.ntp.org iburst
#server 1.rhel.pool.ntp.org iburst
#server 2.rhel.pool.ntp.org iburst
#server 3.rhel.pool.ntp.org iburst

Add to:

server  127.127.1.0  #  local clock
fudge   127.127.1.0  stratum  10

Guaranteed BIOS (motherboard) synchronized with the system time

vim  /etc/sysconfig/ntpd    

Add: SYNC_HWLOCK = yes

 

Start ntpd running processes

service  ntpd start

service ntpd status - guarantee service starts

On 40 machine:

[root@saver1 ~]# ntpdate -u  192.168.1.30

28 Jul 13:03:37 ntpdate[2698]: step time server 192.168.1.30 offset 14401.695083 sec

On 50 machine:

[root@saver2 ~]# ntpdate -u  192.168.1.30

28 Jul 13:03:51 ntpdate[2663]: step time server 192.168.1.30 offset 14401.690938 sec

date view time has been synchronized

Configures the timer, timing synchronized with the clock server every minute

crontab  -e

*/1 * * * * /usr/sbin/ntpdate 192.168.1.30

"Finish"

 

Guess you like

Origin www.cnblogs.com/hello-wei/p/11258625.html