标签:jit epo ntp ref repos when systemctl poll pre
1.服务端安装ntpd服务
yum install ntp
2.修改配置文件,配置文件在/etc/ntpd.conf
注释或者删除以下四行 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 127.127.1.0
3.启动ntp
systemctl restart ntpd
4.查看ntp状态
ntpq -p
[root@master yum.repos.d]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*LOCAL(1) .LOCL. 5 l 13 64 377 0.000 0.000 0.000
服务端
1。安装ntp
2.修改配置文件
注释或者删除以下四行 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 127.127.1.0 iburst
3.启动ntp
4.查看是否同步
ntpq -p
[root@slaver1 yum.repos.d]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*master LOCAL(1) 6 u 1 64 1 0.848 -0.130 0.126
备注:
centos7中设置时间
[root@master yum.repos.d]# date -s "2017-5-2 10:36:00"
把时间同步到硬件时钟
[root@master yum.repos.d]# hwclock -w
标签:jit epo ntp ref repos when systemctl poll pre
原文地址:http://www.cnblogs.com/liutao97/p/6795041.html