当前位置: 首页 > 云计算 > 正文

AWS EC2上修改RedHat系统时区及ntp对时

有人说EC2上不需要进行对时,基于Xen的虚拟机的系统时间会跟宿主的时间保持一致,并且不需要运行ntpd服务,不过从运维的角度我们还是决定根据需要自己配置时区及对时。假设您AWS上的EC2实例是创建在新加坡,并且是面向东南亚用户,可以使用新加坡当地时间。
具体步骤如下:

1. 修改时区 cp /usr/share/zoneinfo/Asia/Singapore /etc/localtime

2. 配置ntp服务
vi /etc/ntp.conf
添加amazon的ntp服务器
server 0.amazon.pool.ntp.org iburst
server 1.amazon.pool.ntp.org iburst
server 2.amazon.pool.ntp.org iburst
server 3.amazon.pool.ntp.org iburst

3. 重启ntpd服务及设置自动启动
/etc/init.d/ntpd start
chkconfig ntpd on

4. 查看ntp状态
ntpstat
ntpq -p

本文固定链接: https://sudops.com/change-aws-timezone-and-config-ntpd.html | 运维速度

该日志由 u2 于2014年06月09日发表在 云计算 分类下,
原创文章转载请注明: AWS EC2上修改RedHat系统时区及ntp对时 | 运维速度
关键字:

报歉!评论已关闭.