Tuesday, March 29, 2011

How to setup a NTP server client on a redhat linux rhel5 system

Sponsored Links
The following post explains how to setup a  NTP server and client on redhat linux systems like rhel5. It will also work on centos, fedora, Suse linux etc.

[root@server ~]# rpm -qa | grep ntp

NTP Server IP :
Client IP     :

Client Configuration :
/etc/ntp.conf   - primary conf file.

open the /etc/ntp.conf file and give the IP of the NTP server as follows
[root@work1 ~]# vi /etc/ntp.conf
server               #Give IP address or FQDN of the NTP server
                                   #Remove all the server entries from the /etc/ntp.conf  file.
:wq                                   #Save the file

Restart the service:
[root@work1 ~]# service ntpd start   

[root@work1 ~]# ntpq -np
     remote           refid      st t when poll reach   delay   offset  jitter
*    LOCAL(0)        11 u   78  128  377    0.682   -0.142   0.071      # * Means default     .LOCL.          10 l   44   64  377    0.000    0.000   0.001
[root@work1 ~]#
It may take sometime.  Or may require a reboot.

To make an immediate effect. Use ntpdate command
[root@work1 ~]# ntpdate -b NTP_Server_IP_or_FQDN

[root@work1 ~]# ntpdate -b
29 Mar 15:40:17 ntpdate[6138]: the NTP socket is in use, exiting
[root@work1 ~]#
Sponsored Links

No comments:

Post a Comment

Be nice. That's all.