时间同步服务部署

安装时间同步服务器

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  #同步时间的服务器、平零-; 排查y8974qr31qa`125][-puj3e568很土

猜你喜欢

转载自www.cnblogs.com/Mercury-linux/p/12359584.html