50 likes | 71 Views
Sometimes you may need to synchronize time with NTP in Linux. Here are the steps to do it.#linux #unix <br><br>Visit https://fedingo.com/how-to-synchronize-time-with-ntp-in-linux/
E N D
Install Chrony in Linux Open terminal and run the following command to install Chrony in Linux server. $ sudo apt-get install chrony [On Debian/Ubuntu] $ sudo yum install chrony [On CentOS/RHEL] $ sudo dnf install chrony [On Fedora 22+] Once chrony is installed, run the following commands to start and enable it to run automatically during system boot. # systemctl enable --now chronyd # systemctl status chronyd You can always run the following command to check if chrony is up & running. # chronyc activity
Check Chrony Synchronization You can run the following command to check list of servers available, status and offsets from local clock and source. Using -v option shows description for each source. # chronyc sources OR # chronyc sources -v If you want to see some more useful information about the sources, use the following command. # chronyc sourcestats OR # chronyc sourcestats -v To check chronyc tracking, run the following command. # chronyc tracking
Configuring Chrony Time Sources The main chrony configuration file is located at /etc/chrony.conf (CentOS/RHEL/Fedora) or /etc/chrony/chrony.conf (Ubuntu/Debian). By default, chrony uses a certain set of servers to fetch UTC time information and synchronize clocks on network. If you want to add another server, open configuration file in text editor. # vim /etc/chrony.conf OR # vim /etc/chrony/chrony.conf Here is an example to add several servers. server 0.europe.pool.ntp.org iburst server 1.europe.pool.ntp.org iburst server 2.europe.pool.ntp.org ibusrt server 3.europe.pool.ntp.org ibusrt Once you have made the required changes, save and close the file, and restart server. $ sudo systemctl restart chrony OR # systemctl restart chronyd
Thank You Visit for details https://fedingo.com/how-to-synchronize-time-with-ntp-in-linux/