linux服務器同步網絡時間

1.服務器安裝ntpdate

yum install -y ntpdate

2.同步網絡時間

ntpdate time.nist.gov

(若同步失敗服務器可更換)

服務器參考列表:

time.nist.gov
time.nuri.net
0.asia.pool.ntp.org
1.asia.pool.ntp.org
2.asia.pool.ntp.org
3.asia.pool.ntp.org

3.同步時間成功後調整硬件時間

#hwclock -w

執行成功後, 查看系統硬件時間(不出意外的話,現在date和hwclock現實的時間均爲internet時間)

#date

#hwclock

參考:https://www.cnblogs.com/whymoney1000/p/11059803.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章