วันอังคารที่ 22 กันยายน พ.ศ. 2563

ตั้งเวลาเครื่อง CentOS8

 systemctl status chronyd

Installing Chrony on RHEL 8 / CentOS 8

Set timezone.

sudo timedatectl set-timezone Asia/Bangkok

Chrony can be installed on RHEL 8 / CentOS 8 from package manager.

sudo yum -y install chrony

After the installation, start and enable chronyd service.

sudo systemctl enable --now chronyd

The service status should show running

$ systemctl status chronyd
● chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2018-12-31 08:11:50 EAT; 5min ago
Docs: man:chronyd(8)
man:chrony.conf(5)
Main PID: 743 (chronyd)
Tasks: 1 (limit: 5061)
Memory: 1.7M
CGroup: /system.slice/chronyd.service
└─743 /usr/sbin/chronyd

Configuring Chrony on RHEL 8 / CentOS 8

After the installation, you can make the changes on Chrony main configuration file /etc/chrony.conf

One main configuration change you can make is to set the time servers closest to you. Since I’m in Nairobi, I’ll set Africa NTP pool of servers.