a:與阿里雲同步 ntpdate ntp4.aliyun.com
b: 區域網內部與某乙個節點同步
1、服務節點安裝ntpd軟體,並啟動。
2、修改配置/etc/ntp.conf
a)解開第18行的注釋,並將網段設定正確
restrict 192.168.10.0 mask 255.255.255.0 nomodify notrap
b)注釋掉第22-25行
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
c)在文件最後 新增兩個設定
server 127.127.1.0
fudge 127.127.1.0 stratum 10
3、修改配置檔案/etc/sysconfig/ntpd
保證bios與系統時間同步 新增sync_hwlock=yes ,儲存退出
4、重啟ntpd 服務
/etc/init.d ntpd restart
5、到其他節點執行同步命令
ntpdate 192.168.10.132(時鐘同步伺服器的ip)
6、驗證
Linux 時鐘同步
與阿里雲同步 安裝ntpdate yum install y ntpdate 時間同步 ntpdate ntp4.aliyun.com 區域網內部與某乙個節點同步 1 服務節點安裝ntpdate軟體,並啟動。2 修改配置 etc ntp.conf a 解開第18行的注釋,並將網段設定正確 restr...
linux同步硬體時鐘
同步系統及硬體時鐘。hwclock clock 命令檢視 設定硬體時間檢視系統硬體時鐘hwclock show 硬體時鐘與系統時鐘同步 hwclock hctosys 或者 clock hctosys hc代表硬體時間,sys代表系統時間,即用硬體時鐘同步系統時鐘 系統時鐘和硬體時鐘同步 hwclo...
Linux 時鐘同步 ntp ntpdate
為hadoop分布式做準備,linux多台機器,需要保證每台機器時間是一致的 我們系統可以每1分鐘和時間伺服器進行同步 時間同步,允許存在毫秒基本的誤差 1 ntpdate ntp servet ip 選擇一台機器作為同步服務a a與外網同步 b,c 同步a 配置機器a sudo vi etc nt...