Ubuntu配置NTP

1、安装  

apt-get install ntp

2、修改ntp.conf配置文件

vi /etc/ntp.conf

添加以下行
server 120.24.166.46 # (阿里云NTP Server)

restrict 192.168.1.0 mask 255.255.255.0 nomodify

restrict 192.168.2.0 mask 255.255.255.0 nomodify

3、重启ntp服务,找个机器验证

service ntp restart

评论

暂无评论