麻倉憂 Yu Asakura
麻倉憂 Yu Asakura

Chrony – 新款的NTP系統校時工具

Chrony是CentOS 7發行之後用來取代ntp的系統校時工具,安裝設定都很簡易,留個操作筆記~ 🤖🤓🤖

# 變更伺服器的時區設定

sudo timedatectl set-timezone Asia/Taipei
sudo timedatectl set-ntp yes

# 安裝Chrony系統校時工具

yum install -y epel-release sudo
sudo yum install -y chrony

# 更換伺服器並啟動該服務


# 防火牆設定
systemctl iptables stop
iptables -A INPUT -p tcp --dport 123 -j ACCEPT
iptables-save | tee /etc/sysconfig/iptables
systemctl restart iptables

# firewalld切換成下列指令
firewall-cmd --permanent --add-service=ntp
firewall-cmd --reload

# 對時
sudo chronyc -a makestep && timedatectl

# 查看與ntp server的同步狀態與ntp server的時間差
sudo chronyc sources -v && timedatectl

# 顯示有關系統時間的資訊
sudo chronyc tracking

# 顯示同步源頭的資訊
sudo chronyc sourcestats -v

ref.

打印本文 打印本文

關於 窮苦人家的小孩

In every democracy, the people get the government they deserve. ~Alexis de Tocqueville
上一篇:
下一篇:

您可能會喜歡

有坂深雪 Miyuki Arisaka

[Debain]安裝HestiaCP

2021新年快樂 🌞㊗☃ 最近 …