一般linux都預裝了 ntpdate 服務。
如果沒有安裝,參考博文:http://blog.csdn.net/zengmingen/article/details/52913486
啟動設置
1、檢查系統服務里有沒有ntpdate
使用命令:chkconfig --list
2、設置開機啟動
chkconfig 的命令詳見:http://blog.csdn.net/zengmingen/article/details/53005062
使用命令:chkconfig --level 12345 ntpdate?on
0,6一般不使用。
# Default runlevel. The runlevels used are:
# ? 0 - halt (Do NOT set initdefault to this)
# ? 1 - Single user mode
# ? 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# ? 3 - Full multiuser mode
# ? 4 - unused
# ? 5 - X11
# ? 6 - reboot (Do NOT set initdefault to this)
#?
id:3:initdefault: