Search This Blog

Sunday 18 December 2016

Synchronize the system clock to Network Time Protocol under Red Hat Linux

The Network Time Protocol daemon (ntpd) program is a Linux operating system daemon. It sets and maintains the system time in synchronism with time servers.

To do this, Configure ntpd via /etc/ntp.conf configuration file.

If ntpd is not installed use  the following command to install ntpd

# yum install ntp

OR

# up2date ntp

Configuration

Open /etc/ntp.conf file using vi text editor:

# vi /etc/ntp.conf

Locate server parameter and set it as follows:

server pool.ntp.org

Save the file and restart the ntpd service:

# /etc/init.d/ntpd start

You can also synchronize the system clock to an NTP server immediately with following command:

# ntpdate pool.ntp.org

Output:

29 Mar 14:07:21 ntpdate[12225]: step time server 125.62.193.121 offset -19767.752487 sec


No comments:

Post a Comment