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

u2

Related Posts

rancher v2.x 初体验

rancher v2x

Read more

sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached

Python3 + Flask + mysql5.7搭建的w…

Read more

You Missed

便宜电视盒子背后的广告欺诈帝 国

  • u2
  • 7月 31, 2026
  • 33 views

Snowflake Cortex AI Gateway:企业 AI Agent 的「信任控制平面」

  • u2
  • 7月 29, 2026
  • 50 views

国产算力训出万亿大模型:美团LongCat-2.0的技术突围

  • u2
  • 7月 28, 2026
  • 60 views

AI逃逸事件全解析:OpenAI模型自主攻破Hugging Face,安全范式正在重构

  • u2
  • 7月 24, 2026
  • 90 views

Kimi K3 冲击波:2.8 万亿参数的野心,和它背后的三场技术硬仗

  • u2
  • 7月 20, 2026
  • 195 views

Anthropic 指控阿里蒸馏攻击:AI 军备竞赛的拐点

  • u2
  • 6月 25, 2026
  • 343 views