转自: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时间同步的更多相关文章

  1. Linux时间同步方式记录

    Linux时间同步 部署Hadoop集群,遇到各个linux服务器的时间不同步的问题,于是研究了一下linux的时间同步方式,特将同步方式,总结如下: A. 前提条件 a)         网络是连通 ...

  2. linux时间同步,ntpd、ntpdate

    linux时间同步,ntpd.ntpdate 在Windwos中,系统时间的设置很简单,界面操作,通俗易懂.而且设置后,重启,关机都没关系.系统时间会自动保存在Bios的时钟里面,启动计算机的时候,系 ...

  3. linux 时间同步的2种方法(转)

    linux 时间同步的2种方法 张映 发表于 2012-10-23 分类目录: 服务器相关 标签:linux, ntp, 同步, 时间服务器 由于硬件的原因,机器或多或少的根标准时间对不上,一个月的误 ...

  4. Linux 时间同步 01 简介

    Linux 时间同步 01 简介 目录 Linux 时间同步 01 简介 时间同步 公共NTP服务器地址及IP 系统时间相关文件 时间同步 大数据产生与处理系统是各种计算设备集群的,计算设备将统一.同 ...

  5. Linux 时间同步 03 ntpdate时间同步

    Linux 时间同步 03 ntpdate时间同步 目录 Linux 时间同步 03 ntpdate时间同步 安装ntpdate 修改/etc/sysconfig/ntpdate 使用ntpdate手 ...

  6. Linux 时间同步 04 ntp时间同步

    Linux 时间同步 04 ntp时间同步 目录 Linux 时间同步 04 ntp时间同步 安装ntp 配置与外部时间服务器进行时间同步的客户端主机 配置其他客户端与以上客户端主机时间同步 验证查看 ...

  7. Linux 时间同步 02 ntpd、ntpdate的区别

    Linux 时间同步 02 ntpd.ntpdate的区别 目录 Linux 时间同步 02 ntpd.ntpdate的区别 [一]这样做不安全. [二]这样做不精确. [三]这样做不够优雅. ntp ...

  8. Linux 时间同步 05 chrony时间同步

    Linux 时间同步 05 chrony时间同步 目录 Linux 时间同步 05 chrony时间同步 chrony 的优势: chrony包介绍 安装chrony 配置与外部时间服务器进行时间同步 ...

  9. linux 时间同步的2种方法

    转载自: http://blog.51yip.com/server/1474.html 由于硬件的原因,机器或多或少的根标准时间对不上,一个月的误差几秒到几分钟不等.对于服务器来说时间不准,会有很多麻 ...

  10. Linux时间同步,ntpdate命令、ntpd服务详解

    声明:以下内容来自网友整理(http://blog.sina.com.cn/s/blog_636a55070101u1mg.html),为便于以后学习暂时收录,请不要随意转载 Linux默认情况下,系 ...

随机推荐

  1. hive数据导出和常用操作

    导出到本地文件 insert overwrite local directory '/home/hadoop'select * from test1; 导出到hdfs insert overwrite ...

  2. HTML DOM(学习笔记二)

    嗯,在HTML DOM(学习笔记一)中简单描述了一下HTML DOM 是什么,这一篇将记录下来有关HTML DOM的内容! 1:DOM节点 首先,再来看一下HTML DOM的树状结构,如下图所示: 这 ...

  3. Oracle对表解锁的操作

    1.查出被锁的表 SELECT  lpad(' ',decode(l.xidusn ,0,3,0))||l.oracle_username User_name, o.owner,o.object_na ...

  4. 洛谷P1470 最长前缀 Longest Prefix

    P1470 最长前缀 Longest Prefix 73通过 236提交 题目提供者该用户不存在 标签USACO 难度普及/提高- 提交  讨论  题解 最新讨论 求大神指导,为何错? 题目描述 在生 ...

  5. 简单的TCPIP 客户端 服务器

    // soClient.cpp : Defines the entry point for the console application. // #include "stdafx.h&qu ...

  6. 解决win 7&win xp等系统无法正常用U盘安装或启动

    目前,制作启动U盘通常是用ultraiso,但由于各种硬件设备与系统的更新,导致现在装系统会出现各种错误. 在用ultraiso制作的启动U盘,装XP时,可能找不到引导项:装win7时,可能提示”wi ...

  7. iOS开发优化的25个方案

    写在前面 本文来自iOS Tutorial Team 的 Marcelo Fabri,他是Movile的一名 iOS 程序员.这是他的个人网站:http://www.marcelofabri.com/ ...

  8. CentOS学习笔记--vi程序编辑器

    vi程序编辑器 Linux里经常需要修改一些配置文件,这时就需要一个编辑器,几乎所有的Linux版本都提供了vi这个编辑器. 文件内容查阅cat命令 如果我们要查阅一个文件的内容时,该如何是好呢?这里 ...

  9. centos6.2下安装redis和phpredis扩展,亲测好用

    安装redis: 下载:http://www.redis.io/download redis-2.6.2.tar.gz ]# tar -zxf redis-2.6.2.tar.gz ]# cd red ...

  10. Clearing Search Values

      Use the SearchClear() method which is part of the Field class to clear search values on a particul ...