ntp时钟同步配置详解

ntp时钟同步
yum install -y ntp
systemctl enable ntpd(设置开机自启)

server
(vi /etc/ntp.conf)


Hosts on local network are less restricted.

restrict 10.19.0.0 mask 255.255.0.0 nomodify notrap # 允许内网其他机器同步时间

Please consider joining the pool (http://www.pool.ntp.org/join.html).

#server 0.centos.pool.ntp.org iburst #注释掉原时钟服务器()
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10

client

(vi /etc/ntp.conf)注释原时钟服务器,增加2行

#Hosts on local network are less restricted
restrict 10.19.36.7 nomodify notrap noquery
server 10.19.36.7 #ntp server inner net
#server 1.centos.pool.ntp.org
#server 2.centos.pool.ntp.org

systemctl restart ntpd
systemctl status ntpd
ntpstat

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值