Linux 配置NTP时间同步服务

发布时间 2023-12-09 17:54:15作者: SpringCore

1.安装[可选,如已安装则跳过]

apt install ntp

2.启动NTP服务

systemctl start ntpd
systemctl enable ntpd

3.查看NTP服务运行状态

systemctl status ntpd

4.修改配置文件

vi /etc/ntpsec/ntp.conf

查找配置文件命令

find / -name ntp.conf

1.使用第三方NTP地址进行时间同步

1.将默认的pool配置注释掉,前面加#号代表注释
2.添加如下内容
server ntp.aliyun.com iburst
3.重启NTP服务
systemctl restart ntpd