centos使用ntp保持时间同步

# 安装并启动ntp
yum install ntp
chkconfig ntpd on
ntpdate pool.ntp.org
service ntpd start

# 修改时区
ln -s /usr/share/zoneinfo/<Zone>/<SubZone> /etc/localtime
# 如果 /etc/localtime 已经存在,可以先删除
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 
# 或者
ln -sf ../usr/share/zoneinfo/America/Toronto /etc/localtime

你可能感兴趣的:(centos使用ntp保持时间同步)