以OPENVZ虛擬機爲例
由於VM系統時間顯示不準確,所以需要進行調整
/sbin/ntpdate 0.centos.pool.ntp.org
ntpdate[1432]: Can't adjust the time of day: Operation not permitted
提示無法調整時間,沒有操作權限
可以這個VPS不允許調整時間,我們可以使用如下方法來調整:
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
以OPENVZ虛擬機爲例
由於VM系統時間顯示不準確,所以需要進行調整
/sbin/ntpdate 0.centos.pool.ntp.org
ntpdate[1432]: Can't adjust the time of day: Operation not permitted
提示無法調整時間,沒有操作權限
可以這個VPS不允許調整時間,我們可以使用如下方法來調整:
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime