Ntp時間服務安裝配置rest
1. 設置時區server
#ln -sf /usr/share/zoneinfo/posix/Asia/Shanghai /etc/localtime同步
2.同步硬件時間cli
# hwclock -w 配置
3.安裝ntp服務file
#yum –y install ntp硬件
4.配置文件/etc/ntp.confim
driftfile /var/lib/ntp/driftyum
restrict -4 default kod notrap nomodify 配置文件
restrict -6 default kod notrap nomodify
restrict 192.168.2.0 mask 255.255.255.0 nomodify notrap
restrict 127.0.0.1
restrict ::1
server 127.127.1.0
fudge 127.127.1.0 stratum 10
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
5.配置client段配置/etc/ntp.conf
server 192.168.2.176 iburst
6.啓動ntp服務
#systemctl start ntpd
#systemctl enable ntpd