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

Raycast深度解析:这个让Mac效率重装升级的东西,到底值不值?

  • u2
  • 4月 14, 2026
  • 44 views

GitHub 25K+星标!Onyx:开源可自托管的企业级AI聊天与RAG平台

  • u2
  • 4月 8, 2026
  • 111 views

InternVL-U 统一多模态模型

  • u2
  • 4月 3, 2026
  • 124 views
InternVL-U 统一多模态模型

Everything Claude Code:开源 Agent 性能优化框架

  • u2
  • 3月 31, 2026
  • 150 views

MiroFish:群体智能预测引擎,让未来在数字沙盘中预演

  • u2
  • 3月 29, 2026
  • 203 views

OpenClaw爆火背后:一个值得深思的转折点

  • u2
  • 3月 25, 2026
  • 163 views