yum install ntp
ntpdate us.pool.ntp.org
因为CentOS系统是用rhas的源码再编译的,很多地方是完全一样的。
rhas5的时区是以文件形式存在的,当前的时区文件是在/etc/localtime
那么其他时区的文件存放在哪里呢?
在/usr/share/zoneinfo下
我们用东八区,北京,上海的时间
cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
reboot
重启之后,date查看时间、查看当前时区 date -R、查看/修改Linux时区和时间