centos时间服务器搭建方法
yum install -y ntpdate
yum install ntp -y
systemctl start ntpd.service
systemctl enable ntpd.service
[root@localhost ~]# vim /etc/ntp.conf
# vim /etc/ntp.conf
restrict 192.168.1.0 mask 255.255.255.0 #添加此行允许1网段设备同步时间
systemctl restart ntpd
Ubuntu时间服务器搭建方法
sudo apt-get install ntp
sudo vi /etc/ntp.conf
restrict 192.168.1.0 mask 255.255.255.0 #添加此行允许1网段设备同步时间
重启ntp服务
sudo systemctl restart ntp
查看ntp服务状态
sudo systemctl status ntp
设置开机启动
sudo systemctl enable ntp
版权说明
本文地址:http://www.liuyangdeboke.cn/?post=13
未标注转载均为本站远程,转载请注明文章出处:
发表评论