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

Linux 系统 NTP服务

发布时间:2020-12-14 00:38:46 所属栏目:Linux 来源:网络整理
导读:Ntp时间服务安装配置 1. ?设置时区 #ln -sf /usr/share/zoneinfo/posix/Asia/Shanghai /etc/localtime 2.同步硬件时间 # hwclock -w? 3.安装ntp服务 #yum –y install ntp 4.配置文件/etc/ntp.conf driftfile /var/lib/ntp/drift restrict -4 default kod no

Ntp时间服务安装配置

1. ?设置时区

#ln -sf /usr/share/zoneinfo/posix/Asia/Shanghai /etc/localtime

2.同步硬件时间

# hwclock -w?

3.安装ntp服务

#yum –y install ntp

4.配置文件/etc/ntp.conf

driftfile /var/lib/ntp/drift

restrict -4 default kod notrap nomodify???

restrict -6 default kod notrap nomodify

restrict 192.168.2.0 mask 255.255.255.0 nomodify notrap?

restrict 127.0.0.1

restrict ::1

server? 127.127.1.0???

fudge?? 127.127.1.0 stratum 10

includefile /etc/ntp/crypto/pw

keys /etc/ntp/keys

5.配置client段配置/etc/ntp.conf

server 192.168.2.176 iburst

6.启动ntp服务

#systemctl start ntpd

#systemctl enable ntpd

(编辑:李大同)

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

    推荐文章
      热点阅读