文档首页> 技术帮助> Linux系统时间同步方法

Linux系统时间同步方法

发布时间:2024-12-24 09:15       

 

 

一、使用NTP服务时间同步

1.安装ntp

[ ~]# yum -y install ntp
C++

2.启动ntp服务

[ ~]# systemctl start  ntpd
[ ~]# systemctl enable  ntpd
Created symlink from /etc/systemd/system/multi-user.target.wants/ntpd.service to /usr/lib/systemd/system/ntpd.service.
C++

3.查看ntp服务

[ ~]# systemctl status ntpd
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2022-08-04 08:00:47 CST; 7h left
 Main PID: 20746 (ntpd)
    Tasks: 1
   Memory: 768.0K
   CGroup: /system.slice/ntpd.service
           └─20746 /usr/sbin/ntpd -u ntp:ntp -g

Aug 04 08:00:47 node ntpd[20746]: Listen normally on 6 lo ::1 UDP