安装:
# yum install ntp
启动:
# systemctl start ntpd
# systemctl enable ntpd
查看同步:
# ntpq -p
开放防火墙:
# firewall-cmd --permanent --add-service=ntp
此时ntp Server已搭建完成
客户端从ntp Server同步
安装:
# yum install ntp
修改配置:
# vi /etc/ntp.conf
server 10.0.0.2 (默认的server列全删掉)
:wq
启动:
# systemctl start ntpd
# systemctl enable ntpd
手动同步:
# /usr/bin/rdate -s 10.0.0.2
查看:
# ntpq -p
时间: 2024-10-22 05:57:08