加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

时间同步服务器

发布时间:2020-12-15 23:26:31 所属栏目:安全 来源:网络整理
导读:一,服务端配置 安装时间服务软件ntp yum install ntp -y rpm - qa ntp ??????? 配置时间同步服务器 egrep -v " ^$|# " /etc/ntp.conf.bak /etc/ntp.conf vim /etc/ntp.conf 1 driftfile / var /lib/ntp/ drift 2 restrict default kod nomodify notrap nopee

一,服务端配置

  安装时间服务软件ntp

   yum install ntp -y

   rpm -qa ntp

??????? 配置时间同步服务器

    egrep -v "^$|#" /etc/ntp.conf.bak >/etc/ntp.conf

    vim /etc/ntp.conf

 1 driftfile /var/lib/ntp/drift
 2 restrict default kod nomodify notrap nopeer noquery
 3 restrict -6 default kod nomodify notrap nopeer noquery
 4 restrict 127.0.0.1 
 5 restrict -6 ::1
 6 restrict 172.16.1.0 mask 255.255.255.0 nomodify notrap
 7 server time1.aliyun.com
 8 server ntp1.aliyun.com
 9 restrict time1.aliyun.com  nomodify notrap noquery
10 restrict ntp1.aliyun.com  nomodify notrap noquery
11 server  127.127.1.0    
12 fudge   127.127.1.0 stratum 10
13 includefile /etc/ntp/crypto/pw
14 keys /etc/ntp/keys

?

启动ntp时间服务器
/etc/init.d/ntpd start
查看时间服务器节点
ntpq -p
二,客户机时间同步
ntpdate 10.0.0.70

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读