NTP server
NTP---------Network Time Protocol
Software: NTP
Configuration file:/etc/ntp.conf
Service: NTPD
Port: 123/UDP
Example: Configuring an NTP time server
1) Installing the NTP software
[[email protected] ~]# Yum install-y NTP
2) Edit the NTP configuration file
[Email protected] ~]# vim/etc/ntp.conf
Restrict 192.168.87.0 mask 255.255.255.0 nomodify
Server 127.127.1.0 Iburst
Fudge 127.127.1.0 Stratum 10
[Email protected] ~]# systemctl start ntpd
[Email protected] ~]# Systemctl enable NTPD
Created symlink From/etc/systemd/system/multi-user.target.wants/ntpd.service to/usr/lib/systemd/system/ Ntpd.service.
[Email protected] ~]#
[Email protected] ~]# Ss-anup | Grep:123
Unconn 0 0 192.168.124.1:123 *:* Users: (("ntpd", pid=6092,fd=20))
Unconn 0 0 192.168.87.101:123 *:* Users: (("ntpd", pid=6092,fd=19))
3) Turn off SELinux and firewalls
Client testing:
[Email protected] ~]# ntpdate 192.168.87.101
Nov 12:15:19 ntpdate[13399]: Adjust time server 192.168.87.101 offset-0.001224 sec
[Email protected] ~]#
This article is from the "lyw666" blog, make sure to keep this source http://lyw666.blog.51cto.com/12823216/1957478
Linux Services NTP