0
点赞
收藏
分享

微信扫一扫

JavaScript 手写代码 第四期

椰果玩安卓 2023-06-30 阅读 23

prometheus需要本地时间与容器时间一致,首先检查本地时间,输入date查看本地时间,设置本地主机的时区和时间

[root@maste prometheus]# date
Fri Jun 23 20:36:51 CST 2023

查看时区

[root@maste prometheus]# timedatectl
      Local time: Fri 2023-06-23 04:16:30 UTC
  Universal time: Fri 2023-06-23 04:16:30 UTC
        RTC time: Fri 2023-06-23 04:16:30
       Time zone: UTC (UTC, +0000)
     NTP enabled: yes
NTP synchronized: no
 RTC in local TZ: no
      DST active: n/a

在输出结果中,找到 “Time zone” 行,确认当前的时区设置。

设置时区
sudo timedatectl set-timezone Asia/Shanghai

安装配置ntp

centos安装ntp

安装NTP软件包(如果尚未安装):
yum -y install ntp

启用并启动NTP服务:
sudo systemctl enable ntpd
sudo systemctl start ntpd

验证NTP服务是否正常运行:
sudo systemctl status ntpd

确认NTP服务开机自启已启用:
sudo systemctl is-enabled ntpd

1:手动同步NT

举报

相关推荐

0 条评论