首页 > 其他 > 详细

centos 7 安装NTP服务

时间:2018-11-04 18:04:31      阅读:112      评论:0      收藏:0      [点我收藏+]

1. 两台服务器

139(server端)

140(client端)

 

2.server端

2.1 yum安装

yum install ntp ntpdate

 

2.2 编辑配置文件

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 192.168.116.139
fudge 127.127.1.0 stratum 11

2.3. 启动服务

systemctl start ntpd

systemctl enable ntpd.service #设置开机启动服务 

 

3. 客户端

3.1  yum安装

yum install ntp ntpdate

3.2 同步时间

ntpdate -d -b 192.168.116.139

3.3 编辑配置文件

和server端相同

3.4 启动服务

systemctl start ntpd

systemctl enable ntpd.service #设置开机启动服务 

 

centos 7 安装NTP服务

原文:https://www.cnblogs.com/duaner92/p/9904753.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!