hilaona 发表于 2012-10-26 12:52:15

lnmp上的北京时间不对怎么弄,我已经搜索了但是不行

lnmp上的北京时间不对怎么弄
在论坛里面搜了 说是会自动调整但是现在后台显示的时间还是相差20多分钟discuz

当前服务器时间:2012-10-26 12:25:03 标准时间:2012-10-26 12:41:18

licess 发表于 2012-10-26 12:57:38

ntpdate -u pool.ntp.org 一下看看,如果过几天还不准就只能

crontab没隔一段时间再执行:ntpdate -u pool.ntp.org

biyexp 发表于 2012-10-26 23:28:47

crontab -e
*/30 * * * * ntpdate -u pool.ntp.org
30分钟执行一次。

hilaona 发表于 2012-10-27 00:29:08

回复 2# 的帖子

返回结果-bash: ntpdate: command not found

licess 发表于 2012-10-27 08:27:32

yum install ntp
或apt-get install ntpdate

hilaona 发表于 2012-10-28 00:02:49

回复 5# 的帖子

还是摸不着头脑


root@ovz-mater:~# apt-get install ntpdate
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
lockfile-progs
The following NEW packages will be installed:
lockfile-progs ntpdate
0 upgraded, 2 newly installed, 0 to remove and 33 not upgraded.
Need to get 9628 B/84.1 kB of archives.
After this operation, 344 kB of additional disk space will be used.
Do you want to continue ? y
Err http://ftp.debian.org/debian/ squeeze/main lockfile-progs i386 0.1.15
404Not Found
Get:1 ftp://ftp.mx.debian.org/debian/ stable/main lockfile-progs i386 0.1.15
Err ftp://ftp.mx.debian.org/debian/ stable/main lockfile-progs i386 0.1.15
Unable to fetch file, server said 'Failed to open file.'
Failed to fetch ftp://ftp.mx.debian.org/debian/pool/main/l/lockfile-progs/lockfile-progs_0.1.15_i386.debUnable to fetch file, server said 'Failed to open file.'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

licess 发表于 2012-10-28 08:05:19

系统源有问题,换个系统源

hilaona 发表于 2012-11-10 03:19:25

回复 7# 的帖子

依然有问题时间还不对....

另外debian出现 yum: command not found 这个怎么弄

[ 本帖最后由 hilaona 于 2012-11-10 03:44 编辑 ]

licess 发表于 2012-11-10 09:01:09

debian肯定没yum
之前你没说centos还是debian肯定和你说2个系统的命令
页: [1]
查看完整版本: lnmp上的北京时间不对怎么弄,我已经搜索了但是不行