时间同步服务部署

安装时间同步服务器

yum install ntp -y

配置文件

vim /etc/ntp.conf

# Hosts on local network are less restricted.
restrict 172.16.1.0/24 mask 255.255.255.0 nomodify notrap

restrict 0.0.0.0 mask 0.0.0.0 nomodify notrap restrict default #default指所有的IP

restrict 192.168.5.0 mask 255.255.255.0 nomodify notrap  #允许该网段内的主机可以进行校时

设置开机自启

systemctl enable ntpd
systemctl start ntpd

客户端

ntpdate 172.16.1.88 
posted @ 2020-02-24 23:39  kerwin-  阅读(265)  评论(0编辑  收藏  举报