· NTP server configuration and setup details, ntp server configuration and Setup
I. NTP server Construction
1) install the NTP service
[root@localhost ~]# yum -y install ntp[root@localhost ~]# vim /etc/ntp.conf
Restrict 172.25.0.0 mask limit 255.0 nomodify notrap // Add the accepted address range # Use public servers from the pool.ntp.org project. # Please consider joining the pool (https://www.pool.ntp.org/join.html ). # server certificate iburst # server 1.rhel.pool.ntp.org iburst # server 2.rhel.pool.ntp.org iburst # server 3.rhel.pool.ntp.org iburstserver s1a.time.edu.cn iburst/China University of Posts
[root@localhost ~]# systemctl start ntpd[root@localhost ~]# systemctl enable ntpd
2) Enable the firewall port. The default NTP port number is UDP123.
[Root @ localhost ~] # Firewall-cmd -- add-service = ntp -- permanent // enable the ntp service permanently [root @ localhost ~] # Firewall-cmd -- reload // repeat the firewall
3) view Synchronization
[root@localhost ~]# ntpq -p remote refid st t when poll reach delay offset jitter==============================================================================*10.112.202.in-a 202.118.1.46 2 u 9 64 1 93.632 9.389 5.115
4) configure the ntp client
[Root @ localhost ~] # Yum-y install ntpdate // install client software [root @ localhost ~] # Ntpdate s1a.time.edu.cn // specify the server domain name [root @ localhost ~] # Systemctl restart ntpdate // restart the service