[转]linux时间同步
转自:http://www.jotop.com/2012/vpsinfo_0525/439.html
美国的vps大多都是国外的时间,让我们的程序总是不适应。那么如何调整linux的时间为北京时间?修改linux vps的时间和时区,有什么办法? 首先,需要ssh登录vps或服务器: date 可以查看时间和时区。然后:
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
再date看看,是不是时间正确了。如果已经正确,那么OK搞定。 SSH操作范例: root@www.ctohome.com~]# date
Thu May 6 02:01:52 UTC 2010
[root@ www.ctohome.com ~]# rm -rf /etc/localtime
[root@ www.ctohome.com ~]# ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
[root@ www.ctohome.com ~]# date
Thu May 6 10:02:32 CST 2010 如果还是有些不对,那么需要用命令 ntpdate stdtime.sinica.edu.tw 来校准时间。 ntpdate stdtime.sinica.edu.tw 如果提示无此命令,那么需要先安装 ntpdate centos 安装方法: yum -y install ntpdate ntp Ubuntu安装方法: sudo apt-get install -y ntpdate ntp 校准后,如果时间还是不对,那么就是其他的问题了。如果是linux vps,那么可能就是母服务器的时间不对,没有办法了。
[转]linux时间同步的更多相关文章
- Linux时间同步方式记录
Linux时间同步 部署Hadoop集群,遇到各个linux服务器的时间不同步的问题,于是研究了一下linux的时间同步方式,特将同步方式,总结如下: A. 前提条件 a) 网络是连通 ...
- linux时间同步,ntpd、ntpdate
linux时间同步,ntpd.ntpdate 在Windwos中,系统时间的设置很简单,界面操作,通俗易懂.而且设置后,重启,关机都没关系.系统时间会自动保存在Bios的时钟里面,启动计算机的时候,系 ...
- linux 时间同步的2种方法(转)
linux 时间同步的2种方法 张映 发表于 2012-10-23 分类目录: 服务器相关 标签:linux, ntp, 同步, 时间服务器 由于硬件的原因,机器或多或少的根标准时间对不上,一个月的误 ...
- Linux 时间同步 01 简介
Linux 时间同步 01 简介 目录 Linux 时间同步 01 简介 时间同步 公共NTP服务器地址及IP 系统时间相关文件 时间同步 大数据产生与处理系统是各种计算设备集群的,计算设备将统一.同 ...
- Linux 时间同步 03 ntpdate时间同步
Linux 时间同步 03 ntpdate时间同步 目录 Linux 时间同步 03 ntpdate时间同步 安装ntpdate 修改/etc/sysconfig/ntpdate 使用ntpdate手 ...
- Linux 时间同步 04 ntp时间同步
Linux 时间同步 04 ntp时间同步 目录 Linux 时间同步 04 ntp时间同步 安装ntp 配置与外部时间服务器进行时间同步的客户端主机 配置其他客户端与以上客户端主机时间同步 验证查看 ...
- Linux 时间同步 02 ntpd、ntpdate的区别
Linux 时间同步 02 ntpd.ntpdate的区别 目录 Linux 时间同步 02 ntpd.ntpdate的区别 [一]这样做不安全. [二]这样做不精确. [三]这样做不够优雅. ntp ...
- Linux 时间同步 05 chrony时间同步
Linux 时间同步 05 chrony时间同步 目录 Linux 时间同步 05 chrony时间同步 chrony 的优势: chrony包介绍 安装chrony 配置与外部时间服务器进行时间同步 ...
- linux 时间同步的2种方法
转载自: http://blog.51yip.com/server/1474.html 由于硬件的原因,机器或多或少的根标准时间对不上,一个月的误差几秒到几分钟不等.对于服务器来说时间不准,会有很多麻 ...
- Linux时间同步,ntpdate命令、ntpd服务详解
声明:以下内容来自网友整理(http://blog.sina.com.cn/s/blog_636a55070101u1mg.html),为便于以后学习暂时收录,请不要随意转载 Linux默认情况下,系 ...
随机推荐
- HDOJ1010(BFS)
//为什么bfs不行呢,想不通 #include<cstdio>#include<cstring>#include<queue>using namespace st ...
- 【IHttpHandler】了解 IHttpHandler
1 .概述 说明:HttpHandler是一个HTTP请求的真正处理中心.在HttpHandler容器中,ASP.NET Framework才调用HttpHandler的ProcessRequest成 ...
- hadoop-集群管理(1)——配置文件
1. 配置文件列表如下: [tianyc@Route conf]$ pwd/home/tianyc/hadoop-1.0.4/conf[tianyc@Route conf]$ ll总用量 76-rw- ...
- 【转】Linux Kernel __setup(str, fn)解析
__setup这条宏在Linux Kernel中使用最多的地方就是定义处理Kernel的启动参数的函数及数据结构,宏定义如下: #define __setup(str, fn) \ __setup_p ...
- linux下alias命令详解
功能说明:设置指令的别名. 语 法:alias[别名]=[指令名称] 形如: alias cp=“cp -i” : 补充说明:用户可利用alias,自定指令的别名.若仅输入alias,则可列出目前所有 ...
- CentOS 5.x版本升级Mysql
#-----------------------------CentOS 5.x版本升级Mysql ------------------#! /bin/sh #1.关闭selinuxcp -rp /e ...
- Objective-C代码的文件扩展名
- 调用WCF Data Service的几点Tips
使用Linq实现sql in statement的时候,用EF的时候可以通过Contains.Exists的方法实现.但是在使用WCF Data Service的context的时候,会报不支持该方法 ...
- "/Date(1405056837780)/" 时间转换
//往往json传过来的时间都是"/Date(1405056837780)/" //转换需要的方法 String.prototype.ToString = function (fo ...
- Java ZK image 處理
自己上 ZK 官方論壇提問.別人的回答.自己解決問題後上傳的問題紀錄: http://forum.zkoss.org/question/101152/how-do-i-binding-image-fi ...