码迷,mamicode.com
首页 > 系统相关 > 详细

Linux时间更新

时间:2017-11-02 14:38:43      阅读:239      评论:0      收藏:0      [点我收藏+]

标签:serve   class   ges   logs   finish   yum安装   down   res   check   

[root@zabbix ~]# date    #查看当前时间
2017年 10月 05日 星期四 20:31:25 CST
[root@zabbix ~]# yum install -y ntpdate   #如果没有该命令,就yum安装一下
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
base                                                       | 3.7 kB     00:00     
extras                                                     | 3.4 kB     00:00     
updates                                                    | 3.4 kB     00:00     
updates/primary_db                                         | 4.7 MB     00:03     
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ntpdate.x86_64 0:4.2.6p5-12.el6.centos.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================
 Package        Arch          Version                        Repository      Size
==================================================================================
Installing:
 ntpdate        x86_64        4.2.6p5-12.el6.centos.1        updates         79 k

Transaction Summary
==================================================================================
Install       1 Package(s)

Total download size: 79 k
Installed size: 123 k
Downloading Packages:
ntpdate-4.2.6p5-12.el6.centos.1.x86_64.rpm                 |  79 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : ntpdate-4.2.6p5-12.el6.centos.1.x86_64                         1/1 
  Verifying  : ntpdate-4.2.6p5-12.el6.centos.1.x86_64                         1/1 

Installed:
  ntpdate.x86_64 0:4.2.6p5-12.el6.centos.1                                        

Complete!

[root@zabbix ~]# ntpdate cn.pool.ntp.org
2 Nov 12:33:26 ntpdate[103153]: step time server 85.199.214.101 offset 2390318.231844 sec
[root@zabbix ~]# date
2017年 11月 02日 星期四 12:33:28 CST

 

Linux时间更新

标签:serve   class   ges   logs   finish   yum安装   down   res   check   

原文地址:http://www.cnblogs.com/biezz/p/7771667.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!