others linux服务器运维 django3 监控 k8s golang 数据库 大数据 前端 devops 理论基础 java oracle 运维日志

ntp内网服务器搭建(无外网)

访问量:54 创建时间:2025-11-30

ntp服务器server端

[root@localhost ]# cat /etc/ntp.conf | egrep -v '^#|^$'
driftfile /var/lib/ntp/drift
server 127.127.1.0
fudge 127.127.1.0 stratum 10
restrict 192.168.0.0 mask 255.255.255.0 nomodify  notrap
restrict source nomodify notrap noepeer noquery
restrict 127.0.0.1 
restrict ::1
tos maxclock 5
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
[root@localhost ]# systemctl start ntpd
[root@localhost ]# systemctl status ntpd
[root@localhost ]# systemctl enable ntpd

ntp服务器client端

vim /etc/ntp.conf
加一行 ,ip为server的ip地址
server  IP
systemctl start ntpd
systemctl enable ntpd
登陆评论: 使用GITHUB登陆