In Centos8 synchronization requires a previous version, time yum install ntp software, and then execute / usr / sbin / ntpdate time.windows.com.cn ( / usr / sbin / ntpdate is a synchronous command, time.windows.com.cn time server) command, the same time to achieve and Internet time server will be able to. But in Centos8 in, yum install ntp prompted when no ntp install the software.
ntpdate method:
Add wlnmp the yum source:
rpm -ivh http://mirrors.wlnmp.com/centos/wlnmp-release-centos.noarch.rpm
Installation time synchronization software:
yum install wntp
test:
date # to display the current time
date -s 2010/01/01 # modification time
date # to display the current time modified
ntp1.aliyun.com ntpdate # sync time
date # to display the current time
It can be added to the time synchronization timing synchronization, real-time systems to ensure consistent and Internet time.