Centos7 设置时间和时区

  1. 设置时区
timedatectl set-timezone Asia/Shanghai
  1. 同步时间
 yum -y install ntp ntpdate
 ntpdate time.windows.com
  1. the NTP socket is in use, exiting
[root@localhost system]# ps aux | grep ntpd
root      42477  0.0  0.0 112712   960 pts/0    S+   02:45   0:00 grep --color=auto ntpd
root     108345  0.0  0.0  29952  2056 ?        Ss   01:40   0:00 ntpd
[root@localhost system]# kill 108345
[root@localhost system]# ps aux | grep ntpd

发布了18 篇原创文章 · 获赞 6 · 访问量 2428

猜你喜欢

转载自blog.csdn.net/INK_FUNC/article/details/103459878