系统相关
首页 > 系统相关> > centos 7 NTP同步设置

centos 7 NTP同步设置

作者:互联网

以前单位都是ubuntu,最近改到了centos,记录下ntp配置

1.安装ntp

yum install ntp ntpdate

2.启动ntp

systemctl start ntpd

systemctl enable ntpd

3.配置内部地址

vim  /etc/ntp.conf

注释

 

#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst

#局域网设置:server 127.0.0.1 iburst
server 10.2.2.102 iburst

# 配置允许上游时间服务器主动修改本机的时间
restrict 10.2.2.102 nomodify notrap noquery

 

4.重启NTP

systemctl restart ntpd

5.查看检查状态

ntpstat

 

标签:同步,centos,NTP,server,iburst,ntp,org,pool
来源: https://www.cnblogs.com/mlwork/p/16403987.html