配置NTP时间服务器

题:配置您的系统,位当前服务器配置一个NTP时间服务器 并 同步时间。html

同步域名:cn.pool.ntp.orgvim

一、安装chrony服务服务器

yum install -y chrony

二、修改配置文件加入 时间域名。注释掉第一行添加时间域名。spa

# vim /etc/chrony.confrest

#server 0.rhel.pool.ntp.org iburst
server cn.pool.ntp.org iburst
server 1.rhel.pool.ntp.org iburst
server 2.rhel.pool.ntp.org iburst
server 3.rhel.pool.ntp.org iburst

注:能够吧rhel几个都注释掉,因为没法ping通,留着会印象效率。code

三、重启时间服务器、开机自启server

systemctl restart chronyd
systemctl enable chronyd

四、设置ntp客户端和服务器同步htm

timedatectl set-ntp true

其余方法:
blog

命令:chronyc

# 立刻同步时间
chronyc> waitsync

五、查看get

timedatectl

 


更多详情:http://www.javashuo.com/article/p-kathgqig-mk.html

相关文章
相关标签/搜索