Centos 6.5 - Red Hat 6.5 时区更改
来源:互联网 发布:python开发的网站源码 编辑:程序博客网 时间:2024/06/14 15:59
tzselect
执行tzselect命令-->选择Asia-->选择China-->选择east China - Beijing, Guangdong, Shanghai, etc-->然后输入1
选择(5)Asia时区
Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.
1) Africa
2) Americas
3) Antarctica
4) Arctic Ocean
5) Asia
6) Atlantic Ocean
7) Australia
8) Europe
9) Indian Ocean
10) Pacific Ocean
11) none - I want to specify the time zone using the Posix TZ format.
#? 5
选择国家(9)China
Please select a country.
1) Afghanistan 18) Israel 35) Palestine
2) Armenia 19) Japan 36) Philippines
3) Azerbaijan 20) Jordan 37) Qatar
4) Bahrain 21) Kazakhstan 38) Russia
5) Bangladesh 22) Korea (North) 39) Saudi Arabia
6) Bhutan 23) Korea (South) 40) Singapore
7) Brunei 24) Kuwait 41) Sri Lanka
8) Cambodia 25) Kyrgyzstan 42) Syria
9) 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
#? 9
选择(1)Shanghai当前时区
Please select one of the following time zone regions.
1) east China - Beijing, Guangdong, Shanghai, etc.
2) Heilongjiang (except Mohe), Jilin
3) central China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.
4) most of Tibet & Xinjiang
5) west Tibet & Xinjiang
#? 1
保存(1)Yes 时区
The following information has been given:
China
east China - Beijing, Guangdong, Shanghai, etc.
Therefore TZ='Asia/Shanghai' will be used.
Local time is now: Wed May 4 14:29:25 CST 2016.
Universal Time is now: Wed May 4 06:29:25 UTC 2016.
Is the above information OK?
1) Yes
2) No
#? 1
执行完tzselect命令选择时区后,时区并没有更改,只是在命令最后提示你可以执行
TZ='Asia/Shanghai'; export TZ
修改时区配置文件
vi /etc/sysconfig/clock
ZONE="Asia/Shanghai"
链接到上海时区
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
查看时区已经更改
cat /etc/sysconfig/clock
The time zone of the system is defined by the contents of /etc/localtime.
This file is only for evaluation by system-config-date, do not rely on its
contents elsewhere.
ZONE="Asia/Shanghai"
ntp服务器联网同步
重启服务器测试更改结果
reboot 或者 init6
执行tzselect命令-->选择Asia-->选择China-->选择east China - Beijing, Guangdong, Shanghai, etc-->然后输入1
选择(5)Asia时区
Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.
1) Africa
2) Americas
3) Antarctica
4) Arctic Ocean
5) Asia
6) Atlantic Ocean
7) Australia
8) Europe
9) Indian Ocean
10) Pacific Ocean
11) none - I want to specify the time zone using the Posix TZ format.
#? 5
选择国家(9)China
Please select a country.
1) Afghanistan 18) Israel 35) Palestine
2) Armenia 19) Japan 36) Philippines
3) Azerbaijan 20) Jordan 37) Qatar
4) Bahrain 21) Kazakhstan 38) Russia
5) Bangladesh 22) Korea (North) 39) Saudi Arabia
6) Bhutan 23) Korea (South) 40) Singapore
7) Brunei 24) Kuwait 41) Sri Lanka
8) Cambodia 25) Kyrgyzstan 42) Syria
9) 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
#? 9
选择(1)Shanghai当前时区
Please select one of the following time zone regions.
1) east China - Beijing, Guangdong, Shanghai, etc.
2) Heilongjiang (except Mohe), Jilin
3) central China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.
4) most of Tibet & Xinjiang
5) west Tibet & Xinjiang
#? 1
保存(1)Yes 时区
The following information has been given:
China
east China - Beijing, Guangdong, Shanghai, etc.
Therefore TZ='Asia/Shanghai' will be used.
Local time is now: Wed May 4 14:29:25 CST 2016.
Universal Time is now: Wed May 4 06:29:25 UTC 2016.
Is the above information OK?
1) Yes
2) No
#? 1
执行完tzselect命令选择时区后,时区并没有更改,只是在命令最后提示你可以执行
TZ='Asia/Shanghai'; export TZ
修改时区配置文件
vi /etc/sysconfig/clock
ZONE="Asia/Shanghai"
链接到上海时区
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
查看时区已经更改
cat /etc/sysconfig/clock
The time zone of the system is defined by the contents of /etc/localtime.
This file is only for evaluation by system-config-date, do not rely on its
contents elsewhere.
ZONE="Asia/Shanghai"
ntp服务器联网同步
美国时间同步服务器 ntpdate time.nist.gov
中国国家授时中心 ntpdate 210.72.145.44
NTP服务器(上海) ntpdate ntp.api.bz
复旦 ntpdate ntp.fudan.edu.cn
微软公司授时主机(美国) ntpdate time.windows.com
台警大授时中心(台湾) ntpdate asia.pool.ntp.org
如果提示报错no server suitable for synchronization found
解决方法添加-u参数可以越过防火墙与主机同步
比如 ntpdate -u 210.72.145.44
重启服务器测试更改结果
reboot 或者 init6
0 0
- Centos 6.5 - Red Hat 6.5 时区更改
- Red Hat 6.5 配置 CentOS 6.5 Yum 源
- Red Hat 6.5 配置使用CentOS 6.5 Yum 源
- Red Hat 6.5配置 Centos 6.5 本地yum源
- Red Hat 6.5 安装 samba
- CentOS更改时区
- 更改CENTOS时区
- red hat centos 安装 yum
- Red Hat 6.5-32 配置使用CentOS 6.5-32 Yum 源
- red hat 6.5 Linux.6.5 安装yum
- VMWare 6.5 安装 Red Hat Linux 9
- Red Hat 6.5修改yum源
- 《Red Hat Enterprise Linux 6.5系统管理 》目录
- Red Hat 6.5 安装VMware 12
- red hat 6.5 安装DB2 10.5
- Red Hat 6.5 VNC安装配置
- red hat 6.5 配置yum源
- Red Hat Enterprise Linux 6.5 学习
- 【已解决】Linux下安装MySQL数据库
- nginx gzip 的使用
- java-使用字符串输出对象
- 上传excel中的内容到服务器
- kvm 虚拟化 virt-install 安装虚拟机
- Centos 6.5 - Red Hat 6.5 时区更改
- ruby on rails ,extjs框架下的ajax使用
- iOS开发 ☞ 各种CG结构体
- 相对路径与绝对路径
- Linux死锁调试之softlockup
- Fragment和Activity之间的数据传递(两种:Acitvity-->Fragment;Fragment---->Activity)
- JVM学习总结--体系结构、内存管理和垃圾回收
- ViewHolder模式
- 你的第一个网页