Archive for 08月, 2010

如何解决CentOS 5 host命令无效(-bash: host: command not found)的问题

当我们检查DNS设置的时候常常会用到host命令,但Centos5默认安装是没有这个命令的。
当显示-bash: host: command not found的时候,我们就需要安装对应的包了
host这个程序是 bind-utils包里面的
所以要先安装 bind-utils
yum install bind-utils 就ok了


如何设置你的CentOS的时间(如何与时间服务器同步)

安装好CentOS,时间默认不是我们所在的东八区,导致上面运行的游戏,每天下午3点才开始发放当天礼包。
我们可以手动设置时间,但最简单办法,是跟时间服务器同步。
这里我介绍几个靠谱的时间服务器地址
第一个当然是国内官方:中国国家授时中心:
http://www.time.ac.cn/stime.asp
其他的:
time.nist.gov
ntp.fudan.edu.cn (复旦) )(国内用户推荐使用此服务器)
timekeeper.isi.edu
subitaneous.cpsc.ucalgary.ca
usno.pa-x.dec.com
time.twc.weather.com
swisstime.ethz.ch
ntp0.fau.de
ntp3.fau.de
time-a.nist.gov
time-b.nist.gov
time-nw.nist.gov
nist1-sj.glassey.com
在CentOS下具体操作是:
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ntpdate ntp.fudan.edu.cn
如果没有安装ntpdate的可以yum一下:
yum install ntp