星期二, 3月 20, 2018

Auto sync CentOS server time

要讓眾 Client 向 Server 對時已是很多系統的基本需求,所以我們得先搞懂 Server 如何讓自己的時間準確?
  • yum install ntp
  • 根據這個網站挑選合適的時間伺服器列表,ping 確認網路通暢後,加在 /etc/ntp.conf
  • systemctl start ntpd
  • systemctl enable ntpd
  • timedatectl set-ntp true
  • 等五分鐘
以前不知要有點耐心,下完指令總以為還缺什麼,就是沒有校正時間?「等五分鐘」值得一記。

沒有留言:

張貼留言