Sync time and set time zone for CentOS 7

Install ntp service

sudo yum install ntp

 

Enable ntp service start at boot up

systemctl enable ntpd

add params"-g -x",Enable ntp service works with delay

sudo vi /etc/sysconfig/ntpd

Restart ntp service

sudo service ntpd restart

Set the time zone to Shanghai +800 (CST Time Zone)

ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

check the time now

date

版权声明:
作者:John
链接:https://vps.la/2017/08/08/sync-time-and-set-time-zone-for-centos-7/
来源:VPS啦
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>