blog/linux/centos系统设置同步时间

centos系统设置同步时间

上海市区设置

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

echo 'Asia/Shanghai' >/etc/timezone

安装ntpdate工具

yum -y install ntp ntpdate

设置系统时间与网络时间同步

ntpdate cn.pool.ntp.org

or => ntpdate -u ntp.api.bz

将系统时间写入硬件时间

hwclock --systohc

4.查看硬件时

hwclock --show
本文总阅读量