如何搭建NTP时间同步服务器-大萝卜博客网

安装NTPD服务端

rpm -qa ntp | grep ntpd

检测是否已经安装,如未安装执行yum安装服务

yum install ntp

关闭防火墙

service iptables stop

设置开启不自动启动防火墙

chkconfig iptables off

修改配置文件/etc/ntp.conf

​ 添加如下内容

​restrict 192.168.100.0 mask 255.255.255.0 nomodify notrap
​server 127.127.1.0 # localclock
​fudge 127.127.1.0 stratum 10

将上面的如下内容进行注释或者删除

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

修改配置文件/etc/sysconfig/ntpd 使BIOS时间与系统时间同步

添加如下内容
SYNC_HWLOCK=yes

重启NTPD服务并设置开机启动

service ntpd restart
chkconfig ntpd on

至此我们的时间同步服务器就搭建好了,可以将此台机器作为时间同步服务器啦~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值