Machine Networking:
If the server can be networked: Perform ntpdate 1.cn.pool.ntp.org the server will automatically synchronize time write a scheduled task to perform a time synchronization every two minutes;
Crontab-e
/2 */usr/sbin/ntpdate 1.cn.pool.ntp.org//So that time synchronization can be achieved
The following is a domestic NTP Server
1.cn.pool.ntp.org
2.cn.pool.ntp.org
3.cn.pool.ntp.org
0.cn.pool.ntp.org
cn.pool.ntp.org
tw.pool.ntp.org
0.tw.pool.ntp.org
1.tw.pool.ntp.org
2.tw.pool.ntp.org
3.tw.pool.ntp.org
If you cannot connect, you need to configure NtpServer NTP's package system default installation service called NTPD
Configuration file/etc/ntp.conf
Add the following lines
Restrict default Kod nomodify notrap nopeer noquery
restrict-6 default Kod nomodify notrap nopeer noquery
Restrict 127.0.0.1
Restrict-6:: 1
Restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap//means that the server from 192.168.1.1-192.168.1.254 can use our NTP server to synchronize time.
Server 192.168.1.12//indicates that the IP on the LAN as an NTP server cannot be networked.
Server 127.127.1.0 # Local clock
Fudge 127.127.1.0 stratum 10//The last two lines of the configuration file serve to provide time services to clients in local time when the server loses contact with a public time server
NTP Client configuration: Manually perform "Ntpdate 192.168.1.12" on the client to synchronize time
Then write the scheduled task timing synchronization time as above
If you are interested in this, please scan the QR code below for free for more details
Linux/centos NTP time synchronization, networking situation and no network configuration