yum安装ntpd服务
1.yum -y install ntp ntpdate (安装时间同步ntp服务)
2. vi /etc/ntp.conf (修改ntpd服务的配置文件)
3.修改配置文件,指定和谁同步时间(140),上面的0-3前面都加#键
#server 0.centos.pool.ntp.org iburst #server 1.centos.pool.ntp.org iburst #server 2.centos.pool.ntp.org iburst #server 3.centos.pool.ntp.org iburst server 192.168.100.140 iburst (指定与140同步)
4. systemctl restart ntpd.service (重启ntpd服务)