CentOS时间同步

前端之家收集整理的这篇文章主要介绍了CentOS时间同步前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

CentOS时间同步

安装ntpdate

[root@node-01~]#yuminstallntpdate-y
Loadedplugins:fastestmirror
SettingupInstallProcess
Loadingmirrorspeedsfromcachedhostfile
*base:mirrors.163.com
*extras:mirrors.zju.edu.cn
*updates:mirrors.163.com
ResolvingDependencies
-->Runningtransactioncheck
--->Packagentpdate.x86_640:4.2.6p5-10.el6.centos.2willbeinstalled
-->FinishedDependencyResolution
DependenciesResolved
================================================================================================================================
PackageArchVersionRepositorySize
================================================================================================================================
Installing:
ntpdatex86_644.2.6p5-10.el6.centos.2base78k
TransactionSummary
================================================================================================================================
Install1Package(s)
Totaldownloadsize:78k
Installedsize:123k
DownloadingPackages:
ntpdate-4.2.6p5-10.el6.centos.2.x86_64.rpm|78kB00:00
Runningrpm_check_debug
RunningTransactionTest
TransactionTestSucceeded
RunningTransaction
Installing:ntpdate-4.2.6p5-10.el6.centos.2.x86_641/1
Verifying:ntpdate-4.2.6p5-10.el6.centos.2.x86_641/1
Installed:
ntpdate.x86_640:4.2.6p5-10.el6.centos.2
Complete!

同步时间

[root@node-01~]#/usr/sbin/ntpdatecn.pool.ntp.org
27Jul15:24:41ntpdate[1674]:steptimeserver85.199.214.101offset-27705.095972sec

加到定时任务中

[root@node-01~]#crontab-e
[root@node-01~]#crontab-l
#timesync
*/5****/usr/sbin/ntpdatecn.pool.ntp.org>/dev/null2>$1

猜你在找的CentOS相关文章