麻仓忧 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新年快乐 🌞㊗☃ 最近 …