独立主机
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime #修改时区到东8区。
date -R #查看的时区设置。
接下来调整系统时间与时间服务器同步
yum install -y ntp #安装ntp
ntpdate -d us.pool.ntp.org #调试查看时间差异
ntpdate us.pool.ntp.org #同步时间
date -R # 检查时间是否同步
修改 ntp 的配置文件
vi /etc/sysconfig/ntpd
SYNC_HWCLOCK=yes #同步独立主机的硬件时钟
#配置开机启动ntp服务,定期同步时间
chkconfig –levels 235 ntpd on #启动ntp同步
/etc/init.d/ntpd start