chrony
Posted dissipate
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了chrony相关的知识,希望对你有一定的参考价值。
prerequisite:
firewalld
-
firewall-cmd --state
-
firewall-cmd --list-all
-
firewall-cmd --zone=public --query-port=123/tcp firewall-cmd --zone=public --query-port=123/udp
-
firewall-cmd --zone=public --add-service=ntp --permanent
-
firewall-cmd --zone=public --add-port=123-125/tcp --permanent
-
firewall-cmd --zone=public --add-port=123/udp --permanent
-
firewall-cmd --reload
-
firewall-cmd --zone=public --list-service
-
firewall-cmd --zone=public --list-port
-
firewall-cmd --zone=public --query-service=ntp
-
firewall-cmd --zone=public --remove-port=123/tcp --permanent
-
/etc/firewalld user profile /usr/lib/firewalld 系统配置文件,预置文件
-
firewall-cmd --panic-on reject all packages firewall-cmd --panic-off firewall-cmd --query-panic
-
firewall-cmd --get-active-zone
-
timedatectl
-
timedatectl set-ntp true
NTP synchronized:no ntp不能同步时间
chronyc
-
A client/server for network time protocol,It was specially designed to support systems with intermittent internet connections.It can also use hardware clocks,system real-time clock or manual input as time references.
-
rpm -ql chrony man chrony.conf
-
/etc/chrony.conf
-
/usr/bin/chronyc
-
/usr/sbin/chronyd
-
-
chrony.conf
cp chrony.conf{,.bak}
server ntp.api.bz iburst
server ntp.aliyum.com iburst
all 192.168.3.0/24
deny 192.168.8.0/24
-
chronyc
-
chronyc -v
-
-
chronyc sources v display information about current sources
-
chronyc sourcestats v display statistics about collected measurements
-
chronyc activity v check how many NTP sources are online/offline
-
chronyc tracking v display system time information
-
chronyc clients v Report on clients that have accessed the server
-
-
chronyc ntpdata v Display information about last valid measurement
-
/etc/chrony.conf中
定义了本机时间未同步时的stratum为10
-
以上是关于chrony的主要内容,如果未能解决你的问题,请参考以下文章