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
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
Normally with NTP, each client should connect to at least 3 servers with the server directive to get the best results and reliability.
In addition, each client can also connect to peers, other clients located at the same level (NTP uses the term stratus) to improve the quality of the computed time.
Simple clients don’t need to set up the peer directive except in very special cases (bandwidth requirement, etc).
I don’t know why the term peers is even mentioned. From my understanding you should only consider the server directive whatever they say or write.