文章目录
Ntpd与NTP服务同步时间
操作系统:Redhat 6.5
一、安装Ntp
在线安装:yum -y install ntp
二、修改ntp配置文件:/etc/ntp.cof
参数简介:[参考连接](https://blog.csdn.net/qq_35663625/article/details/103064495)
server
作用:指定ntp服务器的地址
格式:server [ip or hostname] [perfer]
例子:server 127.127.1.0 <<<将当前主机作为时间服务器
三、查看同步状态:ntpd -p
参数参考:[参考链接](https://blog.csdn.net/zqb765720343/article/details/82629812)
remote:本机和上层ntp的ip或主机名,“+”表示优先,“*”表示次优先
refid:参考上一层ntp主机地址
st:stratum阶层
when:多少秒前曾经同步过时间
poll:下次更新在多少秒后
reach:已经向上层ntp服务器要求更新的次数
delay:网络延迟
offset:时间补偿
jitter:系统时间与bios时间差
四、重启ntp服务:service ntpd restart
五、设置开机自启:chkconfig ntpd on