NTP服务器的搭建和时间同步
一、NTP服务器 1.安装NTP服务 yum install -y ntp 2.修改ntp的配置文件 [root@localhost ~]# grep -Ev "^#|^$" /etc/ntp.conf driftfile /var/lib/ntp/drift pidfile /var/run/ntpd.pid logfile /var/log/ntp.log restrict -4 default kod notrap nomodify restrict -6 default kod notrap nomodify restrict 127.0.0.1 restrict ::1 server ntp.aliyun.com iburst minpoll 4 maxpoll 10 restrict ntp.aliyun.com nomodify notrap nopeer noquery server 127.127.1.0 fudge 127.127.1.0 stratum 8 includefile /etc/ntp/crypto/pw keys /etc/ntp/keys disable monitor 3.重启服务 systemctl start ntpd.service systemctl enable ntpd.service 4.查看状态 [root@localhost