1.  tzselect

[root@xxxx etc]# tzselect     --- 选择时区命令
Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.
) Africa
) Americas
) Antarctica
) Arctic Ocean
) Asia
) Atlantic Ocean
) Australia
) Europe
) Indian Ocean
) Pacific Ocean
) none - I want to specify the time zone using the Posix TZ format.
#?
Please select a country.
) Afghanistan ) Israel ) Palestine
) Armenia ) Japan ) Philippines
) Azerbaijan ) Jordan ) Qatar
) Bahrain ) Kazakhstan ) Russia
) Bangladesh ) Korea (North) ) Saudi Arabia
) Bhutan ) Korea (South) ) Singapore
) Brunei ) Kuwait ) Sri Lanka
) Cambodia ) Kyrgyzstan ) Syria
) China ) Laos ) Taiwan
) Cyprus ) Lebanon ) Tajikistan
) East Timor ) Macau ) Thailand
) Georgia ) Malaysia ) Turkmenistan
) Hong Kong ) Mongolia ) United Arab Emirates
) India ) Myanmar (Burma) ) Uzbekistan
) Indonesia ) Nepal ) Vietnam
) Iran ) Oman ) Yemen
) Iraq ) Pakistan
#?
Please select one of the following time zone regions.
) Beijing Time
) Xinjiang Time
Please enter a number in range.
#? The following information has been given: China
Beijing Time Therefore TZ='Asia/Shanghai' will be used.
Local time is now: Thu May :: CST .
Universal Time is now: Thu May :: UTC .
Is the above information OK?
) Yes
) No

    即可重新加载 本地时间

  date  查看本地时间

  

2.    修改本地 localtime 文件

  

查看/usr/share/zoneinfo 文件夹, 发现全部为地区时间文件

故:  

rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/lcoaltime

date 查看时间, 变为上海  东八区时间

3. ntpdate & ntpd

  yum -y install ntpdate ntp

同步在线网络s

  ntpdate  xxxx

  

crontab: 没十分钟调整一次时间;

*/ * * * * ntpdate time.nist.gov   #域名或IP

  一级时间服务器列表:http://support.ntp.org/bin/view/Servers/StratumOneTimeServers

  二级时间服务器列表:http://support.ntp.org/bin/view/Servers/StratumTwoTimeServers

Linux 修改本地时间 (centos为例)的更多相关文章

  1. Linux修改本地时间

    1.Linux时间调整 1)安装ntp(目的同步时间) yum install ntp 2)修改文件 vi /etc/ntp.conf 添加 server ntp.sjtu.edu.cn perfer ...

  2. linux修改系统时间为北京时间(CentOS)

    删除本地时间 rm -rf /etc/localtime 设置时区为上海 ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 利用date查看 ...

  3. Linux的本地时间和网络时间同步

    Linux本地时间和网络时间不同步,更新了之后,重启还会变回去.可以通过一下方法修改并保存. 1.  安装ntpdate工具 sudo apt-get install ntpdate 2.  设置系统 ...

  4. linux 修改系统时间

    首先进入/proc/sys/xen,执行以下命令 [root@test]#cd   /proc/sys/xen[root@test]#echo 1 > independent_wallclock ...

  5. linux修改系统时间date命令加clock -w

    http://m.jb51.net/LINUXjishu/117784.html 修改linux系统时间的方法(date命令) 11-18 23:22:27作者:脚本之家 命令格式为: date -s ...

  6. Linux修改系统时间与时区

    GMT  (Greewich Mean Time) 格林威治标准时间:GMT是老的时间计量标准,根据地球的自转和公转来计算时间,也就是太阳每天经过位于英国伦敦郊区的皇家格林尼治天文台的标准时间就是中午 ...

  7. linux修改系统时间和时区

    1.修改系统时间linux系统时钟有两个,一个是硬件时钟,即BIOS时间,就是我们进行CMOS设置时看到的时间,另一个是系统时钟,是linux系统Kernel时间.当Linux启动时,系统Kernel ...

  8. Linux修改系统时间为东八区北京时间(上海时间)

    1. Linux时间   Linux的时间分为 System Clock(系统时间)和 Real Time Clock(硬件时间,简称RTC).   系统时间:指系统内核中的时间.   硬件时间:指主 ...

  9. linux修改系统时间和linux查看时区、修改时区的方法

    一.查看和修改Linux的时区 1. 查看当前时区命令 : "date -R" 2. 修改设置Linux服务器时区方法 A命令 : "tzselect" 方法 ...

随机推荐

  1. 【Axios】前端页面使用axios调用后台接口

    项目基本情况 前端项目是用vue.js做的,前端起的服务URL:http://localhost:8080/ 后端项目是用Node.js做的,后端起的服务URL:http://localhost:30 ...

  2. mybatis-generator自动生成代码插件使用详解

    mybatis-generator是一款在使用mybatis框架时,自动生成model,dao和mapper的工具,很大程度上减少了业务开发人员的手动编码时间,今天自己研究了一下,也分享一下使用心得供 ...

  3. Centos7-yum部署配置LNMP+php-fgm,一台机器上部署

    一.简介 1.了解nginx特性 请参考,https://www.cnblogs.com/zhangxingeng/p/10150955.html 2.LNMP:linux+nginx+mysql+p ...

  4. Django-restframework源码分析笔记

    在 APIview 类中的属性有一条是: authentication_classes = api_settings.DEFAULT_AUTHENTICATION_CLASSES 定义了一个类属性为a ...

  5. [Go] golang原子函数锁住共享资源

    1.atomic包里的几个函数以及sync包里的mutex类型,提供了解决方案2.原子函数能够以很底层的加锁机制来同步访问整型变量和指针3.atomic.AddInt64(&counter, ...

  6. laravel项目thinksns-plus安装出现RuntimeException Symlink from * to * failed错误

    今天xshell安装thinksns-plus的laravel项目时出现了一个错误, [RuntimeException] Symlink from "/root/www.z5w.net/t ...

  7. HTML之body标签中的相关标签

    一 字体标签   字体标签包含:h1~h6.<font>.<u>.<b>.<strong><em>.<sup>.<sub& ...

  8. AngularJS处理服务器端返回的JSON数据的格式问题

    用ng的$http服务发起ajax请求,php返回的JSON数据格式要正确! 一开始我的php页面是这样返回数据的: if($result){ $oid = mysqli_insert_id($con ...

  9. BGP: 容易实现路由备份,不容易实现等价负载均衡。

    一.结论: 1.BGP只能建立备份路由,不能建立等价路由. 2.BGP按照下面的规则进行优选路由. BGP选择路由的策略 当到达同一目的地存在多条路由时,BGP依次对比下列属性来选择路由: 优选协议首 ...

  10. Kotlin入门(30)多线程交互

    Android开发时常会遇到一些耗时的业务场景,比如后台批量处理数据.访问后端服务器接口等等,此时为了保证界面交互的及时响应,必须通过线程单独运行这些耗时任务.简单的线程可使用Thread类来启动,无 ...