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

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

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

You Missed

雇佣AI员工,花钱上班:开发者的新”职场”荒诞剧

  • u2
  • 3月 1, 2026
  • 22 views
雇佣AI员工,花钱上班:开发者的新”职场”荒诞剧

OpenClaw 完整使用指南:自托管 AI Agent 的架构与实战

  • u2
  • 2月 25, 2026
  • 105 views
OpenClaw 完整使用指南:自托管 AI Agent 的架构与实战

Anthropic 推出 Claude Code Security:AI 驱动的代码安全神器

  • u2
  • 2月 24, 2026
  • 61 views

来自 OWASP 的代码安全检查工具:Dependency-Check,为你消除安全隐患

  • u2
  • 10月 16, 2025
  • 39 views
来自 OWASP 的代码安全检查工具:Dependency-Check,为你消除安全隐患

技术宅如何躲开越来越垃圾的CSDN?

  • u2
  • 4月 11, 2024
  • 31 views
技术宅如何躲开越来越垃圾的CSDN?

mysql连接失败:The driver has not received any packets from the server

  • u2
  • 3月 26, 2024
  • 31 views
mysql连接失败:The driver has not received any packets from the server