How to set up the NTP service - [RHEL7/CENTOS7]

 How to set up the NTP service - [RHEL7/CENTOS7]

NTP is the protocol which synchronizes Data nad time using NTP server. To synchronizing date through NTP server required services are NTP and chrony.


By default NTP is the classic package, already existing in RHEL 6, RHEL 5 and chrony is the default package in RHEL 7.


We can also synchronize using below command.

# timedatectl set-timezone Asia/Kolkata


In this lession we will discuss how to configure chrony.

Install the Chrony service:

# yum install -y chrony


Activate the Chrony service at boot:

# systemctl enable chronyd


Start the Chrony service:

# systemctl start chronyd


Configure chrony:

# vi /etc/chrony.conf

Comment below lins:

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


Add your NTP server as below:

server xxx.xxx.xxx.xxx iburst

server xxx.xxx.xxx.xxx iburst


Restart the chrony service:

# systemctl stop chronyd

# systemctl start chronyd


Check if chrony service working:

# chronyc sources

210 Number of sources = 1

MS Name/IP address    Stratum    Poll   Reach   LastRx   Last sample 

=============================================================================

^* xxx.xxx.xxx.xxx           11        6      377      63      +1827us[+6783us]...

Comments

Popular posts from this blog

How to install glibc 2.14 on RHEL 6/ RHEL 7/ CentOS 7

Export and Import users/groups and OU in AD Server 2008 using LDIFDE command.

How to Set Up and Configure latest yum repository on CentOS