CentOS7 下如何调整服务时间
2017-05-18 本文已影响0人
SAM320
目标:修改为“北京时区,日期 时间”
1.删除本地时间并设置时区为上海
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
2.同步时间:
ntpdate cn.pool.ntp.org
如果提示command not found,那说明ntp没有安装,使用如下命令进行安装
yum -y install ntpdate ntp
3.查看日期是否正确:
date
PS:zhuang.pinming.cn