[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
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。