CentOS安装ntp时间同步服务
安装ntp
检查服务器是否安装ntp:
rpm -q ntp
安装ntp:
yum install -y ntp
服务端配置
配置文件路径:/etc/ntp.conf
![在这里插入图片描述](https://img-blog.csdnimg.cn/376fba2e941641c283c81676565f289d.png#pic_center)
设置ntp为开机启动
systemctl enable ntpd
查看ntp开机启动状态 enabled:开启, disabled:关闭
systemctl is-enabled ntpd
ntpd启动命令
systemctl start ntpd
ntpd关闭命令
systemctl stop ntpd
ntpd状态命令
systemctl status ntpd