Accurate timekeeping is a critical component in the deployment of modern software. On the other hand, it should be noted that out-of-sync time can cause errors, data corruption, and other difficult debugging issues. By reading this article, you will learn how to Set Up Time Synchronization on Rocky Linux. Therefore, if you are interested in Rocky Linux distribution, we suggest that you stay with us until the end of this article.
Time Synchronization is the process of synchronizing the time of independent clocks. Clocks will diverge without synchronization. Clocks and timepieces often use relatively low-cost components that are not accurate. Time Synchronization creates time accuracy between computer clocks in an Ethernet system.
A client’s time may be synchronized with another server, a reference time source such as a radio or satellite receiver, or a GPS time server. Typical time service configurations use additional servers and diverse network paths to provide high accuracy and reliability. In the continuation of this article, learn about the setup time synchronization on Rocky Linux.
First, you should buy a Linux VPS with the Rocky Linux Operating system. We recommend that you visit the quality and affordable plans on our website. In the beginning, you should list the available time zone by entering the following command:
sudo timedatectl list-timezones
Now you need to set the timezone of your location using the following command:
sudo timedatectl US/Canada
There are two types of NTP daemons including chronyd and ntpd. To avoid two NTP daemons from running on the same machine at a time, select one and use it.
In this article, you can synchronize time with the help of two NTP daemons:
1) Time Synchronization using chronyd which is suitable for virtual systems.
2) Time Synchronization using ntpd which is suitable for the network systems.
First, you can install the chronyd package with the following command:
sudo yum install chrony
chronyd can be used to manually synchronize Rocky Linux server time with the remote NTP server:
chronhyd -q 'server 0.europe.pool.ntp.org iburst'
Then run the following command to start the chronyd service:
sudo systemctl start chronyd
Now you should edit the configuration file:
sudo vi /etc/chrony.conf
Next, you should add the following lines:
server 0.centos.pool.ntp.org iburst server 1.centos.pool.ntp.org iburst server 2.centos.pool.ntp.org iburst server 3.centos.pool.ntp.org iburst
server 0.rhel.pool.ntp.org iburst server 1.rhel.pool.ntp.org iburst server 2.rhel.pool.ntp.org iburst server 3.rhel.pool.ntp.org iburst
Now save the file and exit and then restart the services by entering the following command to apply the changes:
sudo systemctl restart chronyd
You need to enable these services to run at every boot:
sudo systemctl enable chronyd
You can verify if your time system is synchronized or not with the following command:
chronyc tracking
Reference ID is the ID and name of the server with which your system time is currently synchronized. Stratum indicates the number of hops away from the server connected to the reference clock.
The following command can list information about the current time sources that chronyd uses:
chronyc sources
You can list information about drift speed and offset estimation of any source that uses chronyd with the following command:
chronyc sourcestats -v
First of all, install the ntpd package by executing the following command:
sudo yum install ntp
Next, you need to start the ntpd services using the following command:
sudo systemctl start ntpd
Now you should edit the configuration file.
sudo vi /etc/ntp.conf
Then you should add the following lines:
server 0.centos.pool.ntp.org iburst server 1.centos.pool.ntp.org iburst server 2.centos.pool.ntp.org iburst server 3.centos.pool.ntp.org iburst
server 0.rhel.pool.ntp.org iburst server 1.rhel.pool.ntp.org iburst server 2.rhel.pool.ntp.org iburst server 3.rhel.pool.ntp.org iburst
Save the file and exit.
Now you need to restart the services by executing the following command for the changes to take effect:
sudo systemctl restart ntpd
Finally, you should enable services using the following command to run them on every boot:
sudo systemctl enable ntpd
Time Synchronization is essential to determine certain activities of a computer. Every modern system has a mechanism that automatically sets the time of the machine. NTP is one of these mechanisms, and this article taught you how to synchronize time with your NTP server. In this article, you were taught how to set up Time Synchronization on Rocky Linux.
How useful was this post?
Click on a star to rate it!
Average rating 0 / 5. Vote count: 0
No votes so far! Be the first to rate this post.
Each Desktop is a graphical user interface, with its own shape and icon, such as how icons, windows,...
DirectAdmin helps you manage your web server and website easily. Also, this control panel manages fi...
What is your opinion about this Blog?