Fibe-mini 's BLOG

設定CentOS 與 NTP 伺服器同步系統時間

這次檢查了一下CentOS 系統的時間發現有了滿大的誤差,所以決定將系統與NTP 的伺服器同步. 這樣時間就比較不會有誤差.Log 資料的判斷也會比較準確.

設定步驟

1.以root 的身分登入

2. 執行下面的指令安裝NTP

# yum install ntp

3. 啟動服務

#chkconfig ntpd on

4. 設定系統和 time.stdtime.gov.tw 同步 (我們以time.stdtime.gov.tw為例)

#ntpdate time.stdtime.gov.tw

5.啟動ntp

# service ntpd start

6.可以執行下面的指令確定目前系統的時間

#date

Exit mobile version