1、安装ntp及其依赖包 1、安装autogen-5.18-5.el7.x86_64.rpm ntp-4.2.6p5-29.el7.centos.2.x86_64.rpm ntpdate-4.2.6p5-29.el7.centos.2.x86_64.rpm,下载地址contos7.3离线安装ntp及依赖包-CentOS文档类资源-优快云下载
2、启动时间服务器
#查看ntpd服务是否启动
systemctl status ntpd
#启动ntpd服务
systemctl start ntpd
#设置开机启动ntpd
systemctl enable ntpd
# 查看系统时间是否已同步
date
3、启动定时更新
crontab -e
*/1 * * * * /usr/sbin/ntpdate -u ntp1.aliyun.com > /var/log/upclock.log
本文档详细介绍了如何在CentOS7环境下离线安装ntp及其依赖包,包括autogen、ntp和ntpdate,并通过systemctl命令启动和设置ntpd服务为开机启动。同时,教程还提供了使用crontab定期同步时间到阿里云时间服务器的步骤。
4216

被折叠的 条评论
为什么被折叠?



