NTP: Synchronize time using other NTP peers

Share this link

If you didn’t already set up a time server, learn how to configure a NTP server.

Install the NTP package:

# yum install -y ntpd

Edit the /etc/ntp.conf file and comment the following lines if you don’t want to use the default timeservers:

#server 0.centos.pool.ntp.org
#server 1.centos.pool.ntp.org
#server 2.centos.pool.ntp.org

In the same file, add the name (or IP address) of your time server:

server timeserver

Check the system date:

# date

If the system date is more than 15 minutes away from real time, set up the date from your time server:

# ntpdate timeserver

Activate the NTP service:

# chkconfig ntpd on

Start the NTP service:

# service ntpd start

Check that the service is working properly:

# ntpq -p
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Leave a Reply

2 Comments on "NTP: Synchronize time using other NTP peers"

Notify of
Sort by:   newest | oldest
ansuya
Member
ansuya

Hello,

I applied this configuration of NTP in my RHCSA exam.
But in RHCE exam requirements we are asking for “peers sychronizing”.
Where is the peer sychronizing in your post?
The line in ntpd.conf, like this:
#####
peer address
#####

Can you explain clearly difference of this 2 directives:
peer address
## and
server address

wpDiscuz

RHCSA7: Task of the day

Allowed time: 10 minutes.
Create an EXT4 file system mounted under /vol based on a logical volume of 100MB.
Reduce the size to 60MB.

RHCE7: Task of the day

Allowed time: 10 minutes.
Set up a default secure MariaDB database called maria with a user named muser with all privileges.

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...

Recent Comments