您的位置:首页 > 理论基础 > 计算机网络

用ntp 网络同步 CentOS 系统时间

2012-08-30 17:10 253 查看
每台服务器的时间,随着时间的运行而会产生误差,为了减少误差所以要进行时间同步:

# Install ntp
yum install ntp
# Set the timezone
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# Synchronization
ntpdate pool.ntp.org
# Auto start
echo "ntpdate pool.ntp.org" >> /etc/rc.local
# Crontab
crontab -e
0-59/10 * * * * /usr/sbin/ntpdate us.pool.ntp.org | logger -t NTP


如此时间同步完成~~~
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: