运维笔记 之 centos8chrony时间同步

centos8时间同步工具

centos8以后不再使用ntpdate作为时间同步工具,改为使用chrony同步时间。

安装chrony

[root@centos8new ~]# yum install chrony -y

启动chrony服务并设置为自动启动

[root@centos8new ~]# systemctl start chronyd
[root@centos8new ~]# systemctl enable chronyd

编辑chrony配置文件

[root@centos8new ~]# vim /etc/chrony.conf
# 注释掉 pool 2.centos.pool.ntp.org.iburst
# 增加如下两行:
server ntp.aliyun.com iburst
server cn.ntp.org.cn iburst
# 修改后文件如下
# pool 2.centos.pool.ntp.org iburst
server ntp.aliyun.com iburst
server cn.ntp.org.cn iburst

重启chrony服务

[root@centos8new ~]# systemctl restart chronyd.service

你可能感兴趣的:(运维笔记,运维,linux,centos8时间同步,chrony,ntpdate)