設定台灣時區
sudo cp /usr/share/zoneinfo/Asia/Taipei /etc/localtime
設定時間
兩種方式,自行設定時間,或是上網取得標準時間
- 自行設定
sudo date "010224311971.59"
格式為:MMDDhhmmyyyy.ss
- 透過「國家時間與頻率標準實驗室」校正時間
sudo ntpdate time.stdtime.gov.tw
如果出現 ntpdate: command not found,代表系統中沒有裝 ntpdate,透過 yum 來安裝吧
sudo apt-get install yum
yum -y install ntp