NTP服務配置

2021-07-02 18:47:58 字數 681 閱讀 5768

寫於2023年秋,centos6.4

伺服器端

[hadoop@master1 ~]$ sudo chkconfig ntpd on

[hadoop@master ~]$ sudo vi /etc/ntp.conf

server 127.127.1.0

# local clock

fudge 127.127.1.0 stratum 10

[hadoop@master1 ~]$ sudo service ntpd start

客戶端

[hadoop@master2 ~]$ sudo crontab -e

0 */1 * * * /usr

/sbin/ntpdate ntp && /sbin/hwclock -w

在五分鐘內會報:no server suitable for synchronization found,是因為ntp server需要跟其他伺服器同步,包括自己

報「the ntp socket is in use, exiting」是因為本機ntpd服務已起,關掉即可。

sudo service ntpd stop  #關掉服務

sudo chkconfig ntpd off #去掉重啟自啟動

配置ntp服務

客戶端 一 在 etc crontab 2 etc ntp.sh 每兩個小時校對一次時間 二 在 etc ntp.sh中新增 bin bash ntpdate 172.19.61.110 改變 etc ntp.sh的許可權 chmod 700 etc ntp.sh 三 etc init.d fcro...

NTP服務配置

ntp時間同步服務 安裝 1 yum y install ntp 2 service ntpd start 檢視同步詳情 ntpq p 引數 含義 remote 本地機器所連線的遠端ntp伺服器 refid 給遠端伺服器提供時間同步的伺服器 st遠端伺服器的層級別 1 16 避免 1t未知 when...

NTP服務配置

利用 restrict 來管理許可權控制 在 ntp.conf 檔案內可以利用 restrict 來控管許可權,這個引數的設定方式為 restrict 你的ip mask netmask ip parameter 其中 parameter 的引數主要有底下這些 那如果你沒有在 parameter 的...