首页 > 其他 > 详细

CentOS 越南韩国服务器时间同步配置方法

时间:2015-08-26 00:15:01      阅读:741      评论:0      收藏:0      [点我收藏+]

    由于公司的游戏需要在越南和韩国上线,越南的时间比我们慢一个小时,韩国的时间比我们快一个小时,所以服务器配置系统环境的时候需要设置越南服务器同步越南的时间点,韩国服务器同步韩国的时间点,下面设置方法如下:


一、设置越南服务器时间同步:

cat > /var/spool/cron/root <<EOF
*/30 * * * *  /usr/sbin/ntpdate ntp0.cs.mu.OZ.AU > /dev/null 2>&1
EOF

service crond restart


/bin/rm -f /etc/localtime

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

cat > /etc/sysconfig/clock <<EOF
ZONE="Asia/Saigon"
UTC=false
ARC=false
EOF

cat > /etc/ntp.conf << EOF
server cn.pool.ntp.org prefer
server 210.72.145.44
server cn.pool.ntp.org
server ntp1.cs.mu.OZ.AU
server ntp0.cs.mu.OZ.AU
server ntp.alaska.edu
driftfile /var/lib/ntp/ntp.drift
EOF


ntpdate cn.pool.ntp.org
/sbin/hwclock -w



二、设置韩国服务器时间同步:

cat > /var/spool/cron/root <<EOF
*/30 * * * *  /usr/sbin/ntpdate ntp0.cs.mu.OZ.AU > /dev/null 2>&1
EOF

service crond restart


/bin/rm -f /etc/localtime

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

cat > /etc/sysconfig/clock <<EOF
ZONE="Asia/Seoul"
UTC=false
ARC=false
EOF

cat > /etc/ntp.conf << EOF
server cn.pool.ntp.org prefer
server 210.72.145.44
server cn.pool.ntp.org
server ntp1.cs.mu.OZ.AU
server ntp0.cs.mu.OZ.AU
server ntp.alaska.edu
driftfile /var/lib/ntp/ntp.drift
EOF


ntpdate cn.pool.ntp.org
/sbin/hwclock -w


本文出自 “菜鸟中的战斗机” 博客,请务必保留此出处http://linushai.blog.51cto.com/4976486/1688098

CentOS 越南韩国服务器时间同步配置方法

原文:http://linushai.blog.51cto.com/4976486/1688098

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!