1、前提

  由于公司有在印尼的项目,所以购买了阿里云在新加坡机房的服务器(在印尼还没有),印尼当地使用的是东七区的时间,所以领导要求修改阿里云ECS系统的时区。

2、动手

  修改阿里云ECS服务器系统的时区有两种方法:

  1、通过tzselect修改:

[root@iZt4nbfbkurxm1k2bmdsqvZ /]# tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.1) Africa2) Americas3) Antarctica4) Arctic Ocean5) Asia6) Atlantic Ocean7) Australia8) Europe9) Indian Ocean
10) Pacific Ocean
11) none - I want to specify the time zone using the Posix TZ format.
#? 5
Please select a country.1) Afghanistan          18) Israel            35) Palestine2) Armenia          19) Japan            36) Philippines3) Azerbaijan          20) Jordan            37) Qatar4) Bahrain          21) Kazakhstan        38) Russia5) Bangladesh          22) Korea (North)        39) Saudi Arabia6) Bhutan          23) Korea (South)        40) Singapore7) Brunei          24) Kuwait            41) Sri Lanka8) Cambodia          25) Kyrgyzstan        42) Syria9) China          26) Laos            43) Taiwan
10) Cyprus          27) Lebanon            44) Tajikistan
11) East Timor          28) Macau            45) Thailand
12) Georgia          29) Malaysia            46) Turkmenistan
13) Hong Kong          30) Mongolia            47) United Arab Emirates
14) India          31) Myanmar (Burma)        48) Uzbekistan
15) Indonesia          32) Nepal            49) Vietnam
16) Iran          33) Oman            50) Yemen
17) Iraq          34) Pakistan
#? 15
Please select one of the following time zone regions.
1) Java, Sumatra
2) Borneo (west, central)
3) Borneo (east, south); Sulawesi/Celebes, Bali, Nusa Tengarra; Timor (west)
4) New Guinea (West Papua / Irian Jaya); Malukus/Moluccas
#? 1

The following information has been given:IndonesiaJava, SumatraTherefore TZ='Asia/Jakarta' will be used.
Local time is now:    Wed Sep 27 12:58:33 WIB 2017.
Universal Time is now:    Wed Sep 27 05:58:33 UTC 2017.
Is the above information OK?
1) Yes
2) No
#? 1

You can make this change permanent for yourself by appending the lineTZ='Asia/Jakarta'; export TZ
to the file '.profile' in your home directory; then log out and log in again.Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Asia/Jakarta
[root@iZt4nbfbkurxm1k2bmdsqvZ /]# 

View Code

  2、通过修改配置文件:

1.vi /etc/sysconfig/clock
2.ZONE=Asia/Jakarta(查/usr/share/zoneinfo下面的文件)
3.rm /etc/localtime
4.ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

View Code

  然后停止ntp服务,过一段时间之后启动ntp服务即可。

[root@iZt4nbfbkurxm1k2bmdsqvZ /]# date
Wed Sep 27 13:00:57 WIB 2017
[root@iZt4nbfbkurxm1k2bmdsqvZ /]# date -R
Wed, 27 Sep 2017 13:01:06 +0700
[root@iZt4nbfbkurxm1k2bmdsqvZ /]# 

View Code

东八区时间为:

修改成功!

转载于:https://www.cnblogs.com/jie-fang/p/7601459.html

修改阿里云ECS服务器的系统时区相关推荐

  1. 基于阿里云ECS,Ubuntu系统搭建离线下载服务器

    基于阿里云ECS,Ubuntu系统搭建离线下载服务器 很开心能参加本次阿里云训练营,使用的ECS是阿里云,ubuntu系统 1.了解什么是CCAA CCAA 是服务器离线下载解决⽅案包,组件包含了Ar ...

  2. 阿里云ECS服务器无法发送邮件

    摘自:http://www.100cm.cn/article-126-759.html 阿里云ECS服务器专用网络无法发送邮件/邮件发送不出去? 发表:管理员 发表时间:2017-06-17 12:4 ...

  3. 阿里云ECS服务器搭建wordpress个人博客网站【详细图文教程】

    阿里云ECS服务器搭建wordpress个人博客网站[小白专用的图文教程] 在阿里云上搭建使用个人博客主要分为以下几个步骤: 1.购买阿里云ECS主机 2.购买域名 3.申请备案 4.环境配置 5.安 ...

  4. 阿里云centos mysql_阿里云ECS服务器CentOS7上安装MySql服务-阿里云开发者社区

    阿里云ECS服务器CentOS7上安装MySql服务 ---------------------------------------------- 使用root登录 1.确保服务器系统处于最新状态 [ ...

  5. 阿里云ECS服务器CentOS7上用户管理操作

    阿里云ECS服务器CentOS7上用户管理操作 ---------------------------------------------- 使用root登录 # 查看系统中所有用户 [root@lo ...

  6. 阿里云ECS服务器搭建Mysql数据库

    阿里云ECS服务器搭建Mysql数据库 一.服务器系统: Alibaba Cloud Linux 3.2104 LTS 64位 二.服务器文件夹创建 [说明]:由于服务器为新申请,故服务器为空白服务器 ...

  7. 阿里云ECS服务器使用要求及不可以进行的操作

    用户购买阿里云ECS服务器后在使用上有限制以及不允许做的事情,为了保证云服务器ECS的正常运行,希望大家看完这篇文章严格遵守,以免给服务器带来麻烦. 一.云服务器ECS使用禁止 禁止用户使用 ECS ...

  8. 本地windows首次远程登录阿里云ECS服务器

    本地windows首次远程登录阿里云ECS服务器 本地为Windows环境 一.前提条件: (以下4点前提条件的相关操作可以看我另一篇文章:在本地实现远程登录阿里云服务器的前提条件) 1.在阿里云EC ...

  9. 阿里云ECS服务器可以干嘛,企业和个人改如何选择服务器?

    什么是阿里云ECS服务器? 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,降低 IT 成本,提升运维效率,使您更专注于核心业务创新.简单来说就是一种VP ...

最新文章

  1. 浅谈数据分析的魅力和能力要求!
  2. React项目 --ES6 语法中的class (9)
  3. WinFrom子窗体向父窗体传值
  4. Asp.Net+SqlServer+EntityFrameWork(项目问题总结)
  5. document.forms用法
  6. 【Linux】一步一步学Linux——unalias命令(206)
  7. 迟迟发布的软工实践两月感想
  8. 软件设计和设计的问题
  9. python利用自动识别写模块_序章:资料预处理(python3.6 可用fortran unformatted sequencial data读取模块)...
  10. echarts中toolbox位置_echarts toolbox 扩展
  11. ionic2+启动白屏问题-------之补充解决之道
  12. 后序遍历二叉树(迭代 vs 递归)
  13. Swift 实践之UIWebView
  14. 【路径规划】局部路径规划算法——B样条曲线法(含python实现)
  15. 模拟电子技术基础 --1. 常用半导体器件
  16. 2021杭电多校第三场 D题—Game on Plane(思维题)
  17. 39页大数据治理运营整体解决方案
  18. 详解如何进入、退出docker容器的方法
  19. 有两个表A和B,均有key和value两个字段,如果B的key在A中也有,就把B的value替换为A中对应的value...
  20. unity3d中隐藏/显示物体方法总结 – unity3d游戏开发

热门文章

  1. word2010添加b5纸张大小_【仁美文化】散文:薄如纸张
  2. java mb单位转换_Java计算机硬盘大小转换(B,KB,MB,GB,TB,PB之间的大小转换)
  3. java 改变文件权限_Java文件权限
  4. jqueryui手风琴_jQueryUI手风琴插件
  5. python字符串find_Python字符串find()
  6. primefaces教程_Primefaces树,TreeNode,TreeTable示例教程
  7. 人工智能发展中面临的问题有哪些?
  8. Java面试问题:新的任务提交到线程池,线程池是怎样处理
  9. 开课吧课堂之Super的第2种用法
  10. Arrays.copyOf()方法详解-jdk1.8