修改centos服务器时区并同步最新时间

rm -rf /etc/localtime

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

ntpdate cn.pool.ntp.org

 

修改crontab

vi /etc/crontab

#每天晚上11点同步时间服务器

0 23 * * * root /usr/sbin/ntpdate cn.pool.ntp.org

posted @ 2019-12-02 14:23  卡卡西村长  阅读(288)  评论(0编辑  收藏  举报