ntp服务端和客户端

1. 检查NTP服务端

systemctl status ntpd

2. 检查NTP客户端配置

cat /etc/ntp.conf

cat /etc/chrony/chrony.conf

3. 检查NTP服务是否安装

dpkg -l | grep ntp

dpkg -l | grep chrony

rpm -qa | grep ntp

rpm -qa | grep chrony

4. 检查NTP服务是否运行(通用方法)

ps aux | grep ntpd


ps aux | grep chronyd

  • 启动服务:systemctl start ntpd 或 systemctl start chronyd
  • 停止服务:systemctl stop ntpd 或 systemctl stop chronyd
  • 重启服务:systemctl restart ntpd 或 systemctl restart chronyd
  • 启用服务开机自启:systemctl enable ntpd 或 systemctl enable chronyd
  • 禁用服务开机自启:systemctl disable ntpd 或 systemctl disable chronyd
posted @ 2026-02-08 22:00  KLAPT  阅读(4)  评论(0)    收藏  举报