This article provides a guide for how to install NTP time servers on AlmaLinux 9 VPS servers.
How to Install NTP Time Servers on AlmaLinux 9 VPS
Pre-requisites:
To install NTP time servers on AlmaLinux 9 VPS, the following conditions must be met:
- root user or sudo privalages (see also: How to Use Sudo)
What are NTP Time Servers?
NTP stands for Network Time Protocol and is used for clock synchronization across multiple computers.
Steps to Install NTP Time Servers on AlmaLinux VPS
To install NTP time servers on AlmaLinux 9 VPS, you can use chrony, which is the default NTP client and server on AlmaLinux.
Here are the steps to follow:
- Login using SSH terminal to your AlmaLinux VPS:
- Install chrony with the command:
sudo dnf install chrony
- Enable chrony to start automatically at boot with the command:
sudo systemctl enable --now chronyd
- Configure chrony as an NTP server by editing the file
/etc/chrony.conf
and adding the lineallow <network>
for each network that you want to serve. For example,allow 192.168.1.0/24
will allow the 192.168.1.0/24 network to sync with your NTP server. - Restart chrony with the command:
sudo systemctl restart chronyd
- If you have firewalld enabled, you need to allow the port 123 for NTP with the command:
sudo firewall-cmd --permanent --add-service=ntp && sudo firewall-cmd --reload
The NTP time servers are now successfully installed on your AlmaLinux 9 VPS.