How to Install and Configure NTP Server and Client on centos 7/RHEL7
HTML-код
- Опубликовано: 12 окт 2016
- Red Hat Certified System Administrator (RHCSA) exam objectives : Configure a system to use time services using chrony
NTP (Network Time Protocol) is a protocol to keep servers time synchronized: one or several master servers provide time to client servers that can themselves provide time to other client servers.
In this quick tutorial im going to explain how to set an NTP server on centos 7/RHEL 7 using chrony.
#######################################################################
SERVER CONFIGURATION
#######################################################################
yum install chrony -y
vi /etc/chrony.conf
-Go to this site and choose your pool zone
www.pool.ntp.org/
-Add the following pool zone
server 0.it.pool.ntp.org iburst
server 3.europe.pool.ntp.org iburst
server 2.europe.pool.ntp.org iburst
- Specify a host, subnet, or network from which to allow NTP connections
allow 192.168.1.0/24
systemctl enable chronyd && systemctl start chronyd
firewall-cmd --permanent --add-service=ntp
firewall-cmd --reload
#######################################################################
CLIENT CONFIGURATION
#######################################################################
yum install chrony -y
vi /etc/chrony.conf
-Add NTP Server
server ip_of_your_server iburst
systemctl enable chronyd && systemctl start chronyd
timedatectl set-ntp true # or timedatectl set-ntp 1
Time synchronization can also be forced with the below chronyc commands
chronyc -a makestep
chronyc tracking
Great
show! great!
Thank you very much