LMS知識社群各系上網率圖資處首頁登入
Centos 7 網路校時
by 洪瑞展 2017-11-07 19:14:03, 回應(0), 人氣(3960)
# 安裝NTP
yum install ntp ntpdate ntp-doc -y
# 設定開機啟用ntpd服務
systemctl enable ntpd
# 同步時間
ntpdate time.stdtime.gov.tw
# 啟用服務
systemctl start ntpd

# 設定NTP server
vim /etc/ntp.conf
# 註解下方設定
#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
# 加入下方設定
server time.stdtime.gov.tw
server clock.stdtime.gov.tw
server tick.stdtime.gov.tw
# 編輯 /etc/sysconfig/ntpd 
vim /etc/sysconfig/ntpd 
# 將內容修改如下BIOS的時間也會跟著改變。
OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid -g"
SYNC_HWCLOCK=yes