A. 更新源,并安裝ntpdate
apt-get update
apt-get install ntpdate
ntpdate ntp1.aliyun.com
修改時區(qū)
-
修改設(shè)置Linux服務(wù)器時區(qū)
方法 A 命令 : “tzselect”
方法 B 僅限于RedHat Linux 和 CentOS 命令 : “timeconfig”
方法 C 適用于Debian 命令 : “dpkg-reconfigure tzdata”
通過/etc/profile來修改
echo “export TZ=‘UTC’” >> /etc/profile
source /etc/profile 更新系統(tǒng)變量
采用本方式進(jìn)行修改時區(qū)配置文章來源:http://www.zghlxwxcb.cn/news/detail-672312.html
[root@Matrix_061001 ~]echo "export TZ='Asia/Shanghai'" >> /etc/profile
[root@Matrix_061001 ~]source /etc/profile
NTP和RTC時間同步文章來源地址http://www.zghlxwxcb.cn/news/detail-672312.html
[root@Matrix_061001 ~]cat /etc/default/ntpdate
#Configuration script used by ntpdate-sync script
NTPSERVERS="ntp1.aliyun.com"
#Set to "yes" to write time to hardware clock on success
UPDATE_HWC
到了這里,關(guān)于如何在Debian中同步系統(tǒng)時間?Debian 系統(tǒng)時間配置(NTP服務(wù))的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!