linux安装完毕时区时间问题ntp
二月 20th, 2010 Posted in Centos | 阅读次数: 397 次
Author:gaojinbo
time:2010-2-20
安装完系统发现时间与现实时间相差+8小时,经分析由以下产生。
我们在安装时选择的是上海,而centos5把bios时间认为是utc时间,所以+8小时给我们。这个时候的bios的时间和软件的时间是不一致的。一个代表 utc 一个代表我们设置的cst(+8时区)。
我们要做的调整是:
1、vi /etc/sysconfig/clock
ZONE="Asia/Shanghai"
UTC=false (主要是这个选项,设置硬件时钟不是跟utc一致)
ARC=false
2、linux的时区设置为 上海
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
3、对准时间ntp
ntpdate 192.43.244.18
4、设置硬件时间和软件时间的一致并校准
/sbin/hwclock –systohc
这样我们的linux软件和计算机硬件都是cst时间了--并且是我们设置的上海时区
done!
随机日志
Tags: ntp
五月 2nd, 2011 at 04:42
Some New Websites I Found…
[...]below you can check out my links page http://www.pregnancymiraclez.net/my-favourite-sites/ with some fantastic websites that I think you should visit[...]…
五月 2nd, 2011 at 04:57
Exercises to Lose Love Handles…
[...]below you can check out my links page http://www.loselovehandlesfastblog.com/links/ with some great sites that I think you should visit[...]…
五月 15th, 2011 at 02:07
Interesting Article…
[...]some interesting sites worth visitng. We recommend all our readers go and check these out[...]……
五月 26th, 2011 at 00:11
Interesting Posts…
[...]some other related resources on the web that are worth viewing on this subject include[...]…
七月 8th, 2011 at 23:18
You should check this out…
[...] Wonderful story, reckoned we could combine a few unrelated data, nevertheless really worth taking a look, whoa did one learn about Mid East has got more problerms as well [...]……