Sync with ntp server in CentOS

From https://www.thegeekdiary.com/centos-rhel-how-to-configure-ntp-server-and-client/.

>> sudo yum install ntp

>> cat /etc/ntp.conf
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
server *** PUT SERVER IP/DN here ***
driftfile /var/lib/ntp/drift
keys /etc/ntp/keys

>> sudo systemctl enable ntpd
>> sudo systemctl start ntpd

Leave a comment