yum安装ntpd服务

1.yum -y install ntp ntpdate #安装时间同步ntp服务

2.修改ntpd服务的配置文件,位置 vi /etc/ntp.conf

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同步
修改配置文件,指定和谁同步时间(140),上面的0-3前面都加#键

4. systemctl restart ntpd.service #重启ntpd服务
浙公网安备 33010602011771号