centos7安装配置NTP时间服务

一、配置内网NTP-Server(1台)

1、安装ntp服务

yum install -y ntp

2、配置ntp服务端配置文件

vi /etc/ntp.conf

ntp.conf 添加如下内容(内网NTP服务端配置)

# 允许内网网段 192.168.0.0 其他机器同步时间
restrict 192.168.0.0 mask 255.255.0.0 nomodify
 
# 中国这边最活跃的时间服务器 : http://www.pool.ntp.org/zone/cn
server ntp.api.bz perfer   	
server 210.72.145.44		 # 中国国家受时中心
server 202.112.10.36             # 1.cn.pool.ntp.org
server 59.124.196.83             # 0.asia.pool.ntp.org
# 允许上层时间服务器主动修改本机时间
restrict ntp.api.bz nomodify notrap noquery
restrict 210.72.145.44 nomodify notrap noquery
restrict 202.112.10.36 nomodify notrap noquery
restrict 59.124.196.83 nomodify notrap noquery


# 外部时间服务器不可用时,以本地时间作为时间服务
server  127.127.1.0     # local clock
fudge   127.127.1.0 stratum 10

在如下截图位置

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值