centos7安装chronyd服务
一、双节点部署:
ip | 主机名 |
---|---|
192.168.100.10 | controller |
192.168.100.20 | compute |
二、配置时间同步
1、双节点安装chrony服务(这里是使用本地的软件包进行yum安装)
[root@controller ~]# yum install -y chrony
[root@compute ~]# yum install -y chrony
2、controller修改chrony服务配置文件(在/etc/chrony.conf目录下)
[root@controller ~]# vi /etc/chrony.conf
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#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 controller iburst //添加这一行
# Record the rate at which the system clock gains/losses time.
driftfile /var/lib