差異處
這裏顯示兩個版本的差異處。
下次修改 | 前次修改 | ||
ntp [2016/11/09 22:04] jz 建立 |
ntp [2016/11/30 22:29] (目前版本) jz |
||
---|---|---|---|
行 1: | 行 1: | ||
====== set time ====== | ====== set time ====== | ||
+ | <code> | ||
date --set="23 June 1988 10:00:00" | date --set="23 June 1988 10:00:00" | ||
date --set="10:00:00" | date --set="10:00:00" | ||
- | ===== Set the Hardware Clock to the current System Time ===== | + | Set the Hardware Clock to the current System Time |
+ | # hwclock --systohc | ||
- | # hwclock --systohc | ||
Set the System Time from the Hardware Clock. | Set the System Time from the Hardware Clock. | ||
- | |||
# hwclock --hctosys | # hwclock --hctosys | ||
+ | </code> | ||
====== update via ntp ====== | ====== update via ntp ====== | ||
+ | via ntpd | ||
+ | <code> | ||
sudo service ntp stop | sudo service ntp stop | ||
sudo ntpd -gq | sudo ntpd -gq | ||
sudo service ntp start | sudo service ntp start | ||
+ | </code> | ||
- | or | + | via ntpdate |
+ | <code> | ||
ntpdate ntp.ubuntu.com | ntpdate ntp.ubuntu.com | ||
+ | </code> | ||
+ | ====== ntp server ====== | ||
+ | 如果出現 ''Server dropped: strata too high'',在 ntp.conf 新增以下 | ||
+ | <code> | ||
+ | server 127.127.1.0 | ||
+ | fudge 127.127.1.0 stratum 8 | ||
+ | </code> | ||