NTP Server configuration in linux

 

NTP- Stand for Network Time Protocol it is used for sync the Time with Client Machines .

Port No : 123

RPM : chrony

Deamon Name : chrony

Configuration file : /etc/chrony.conf                       (earlier we used ntp.conf file )
My Scnerio
Server Ip : 192.168.1.7                    OS: RHEL
Client Ip : 192.168.1.8                     OS:RHEL7
Server Side

#rpmquery chrony                                                          (for verify if RPm installed )

#vi /etc/chrony.conf

1.Allow your network ID 

2.uncomment local stratum                        (use the local clock even disconnect from internet )

 

 

 

 

 

 

 

 

#firewall-cmd –permanent –add-service=ntp

#firewall-cmd –reload

#systemctl restart chronyd

 

 

 

 

Now NTP Server has been configured any time we can set on this same will synchronize on client as well .

#date –s 10:20                   (for set time on machine example )

 

Client Side:-

Install the Chrony RPM from RHEL DVD or by YUM .

#rpmquery chrony                                                         

#vim /etc/chrony.conf

Add the Entry of NTP Server

 

 

 

 

 

 

#systemctl restart chronyd

#chronyc sources –v                       (for check the my current NTP server )

#date                                                   

 

 

 

 

 

 

 

 

Now all done if we change our date/time on NTP server same will reflect on clients

Leave a Reply

Your email address will not be published. Required fields are marked *