美文网首页
CentOS7 下如何调整服务时间

CentOS7 下如何调整服务时间

作者: SAM320 | 来源:发表于2017-05-18 15:22 被阅读0次

目标:修改为“北京时区,日期 时间”

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

相关文章

网友评论

      本文标题:CentOS7 下如何调整服务时间

      本文链接:https://www.haomeiwen.com/subject/wcxfxxtx.html