溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

NTP配置內(nèi)網(wǎng)中集群機(jī)器的時(shí)間同步

發(fā)布時(shí)間:2020-06-27 22:46:59 來源:網(wǎng)絡(luò) 閱讀:1523 作者:q595754733 欄目:建站服務(wù)器
[huiyunltd@hadoop-senior ~]$ rpm -qa|grep ntp

[huiyunltd@hadoop-senior ~]$ sudo vim /etc/ntp.conf

restrict 192.168.8.0 mask 255.255.252.0 nomodify notrap

#server 0.centos.pool.ntp.org
#server 1.centos.pool.ntp.org
#server 2.centos.pool.ntp.org

server  127.127.1.0     # local clock
fudge   127.127.1.0 stratum 10  



[huiyunltd@hadoop-senior ~]$ sudo vim /etc/sysconfig/ntpd

# Drop root to id 'ntp:ntp' by default.
SYNC_HWCLOCK=yes
OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid -g"



[huiyunltd@hadoop-senior ~]$ sudo service ntpd start
[huiyunltd@hadoop-senior ~]$ sudo service ntpd status
[huiyunltd@hadoop-senior ~]$ sudo service ntpd status

[huiyunltd@hadoop-senior ~]$ sudo chkconfig ntpd on
[huiyunltd@hadoop-senior ~]$ sudo chkconfig --list|grep ntpd
ntpd           	0:off	1:off	2:on	3:on	4:on	5:on	6:off


[huiyunltd@hadoop-senior02 ~]$ sudo crontab -e
0-59/10 * * * * /usr/sbin/ntpdate hadoop-senior.huiyunltd.com


[huiyunltd@hadoop-senior ~]$ sudo date -s 2017-06-23
[huiyunltd@hadoop-senior ~]$ sudo date -s 13:02:10


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI