任何人都可以给我这个build议吗?
我通过Webmin在我的debian服务器上运行更新。 更新一些apache2等后,它显示更新失败。
之后,我无法启动apache2。 我必须跑步
netstat -ltnp | grep ':80'
然后
kill -9 1047
现在我可以启动apache2。
更新后第一次启动时,fastCGI上的一些网站将无法工作。 我必须在ISPconfig3中将它们更改为mod-PHP,现在可以工作。
现在我甚至不能重新启动Apache而不杀pid。
在ISP的日志中我看到这个:
Unable to open logs (98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down
在一些网站的日志中我看到这个:
[emerg] (13)Permission denied: mod_fcgid: can´t lock process table in pid 19264
你认为这将是解决scheme:
apt-get update
和
apt-get upgrade
完成所有更新? 我有点恐慌,如果我这样做,那么下一个错误将会发生。
如果我看看Apache日志,我看到以下错误:
Debian Python version mismatch, expected '2.6.5+', found '2.6.6'
但之前那个问题之前就是这样的。
澄清一些观点,
kill -9来停止进程,除非你真的没有别的select,比如它根本没有响应。 这可能会导致数据丢失/损坏。 相反,你可以使用脚本/etc/init.d/apache2 apt-get update和apt-upgrade会为您提供debian提供的修补程序和更新,这些修补程序和修补程序大多是错误修复和安全修补程序。 unable to open logs错误可能表示权限问题。 检查你的日志文件的权限,并让你用sudo启动apache。
could not bind to address错误表示该端口已经为其他进程保留。 你可以使用netstat -lnp来validation。
你给的错误…
[emerg] (13)Permission denied: mod_fcgid: can´t lock process table in pid
…在这个apache bug中被说明了,它是由于某些版本的mpm-itk和mod_fcgid之间的不兼容导致的。
每次服务器提供一个fastcgi页面时,都会显示它,通常是PHP。 服务器仍将在此状态下提供静态内容。
https://issues.apache.org/bugzilla/show_bug.cgi?id=55350
这个bug还没有被修正,所以现在的解决scheme是切换到mpm-prefork,或者改成使用非fastcgi。 对于PHP切换到使用mod-php。
在Debian / Ubuntu系统上,只需运行即可切换到mpm-prefork
apt-get remove apache2-mpm-itk
Debian切换自己:
root@vps1:/var/lib/apache2/fcgid# apt-get remove apache2-mpm-itk Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: apache2-mpm-prefork The following packages will be REMOVED: apache2-mpm-itk The following NEW packages will be installed: apache2-mpm-prefork 0 upgraded, 1 newly installed, 1 to remove and 109 not upgraded. Need to get 2,358 B of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? Get:1 http://ftp.debian.org/debian/ wheezy/main apache2-mpm-prefork amd64 2.2.22-13+deb7u2 [2,358 B] Fetched 2,358 B in 0s (7,481 B/s) dpkg: apache2-mpm-itk: dependency problems, but removing anyway as you requested: libapache2-mod-php5 depends on apache2-mpm-prefork (>> 2.0.52) | apache2-mpm-itk; however: Package apache2-mpm-prefork is not installed. Package apache2-mpm-itk is to be removed. apache2 depends on apache2-mpm-worker (= 2.2.22-13+deb7u2) | apache2-mpm-prefork (= 2.2.22-13+deb7u2) | apache2-mpm-event (= 2.2.22-13+deb7u2) | apache2-mpm-itk (= 2.2.22-13+deb7u2); however: Package apache2-mpm-worker is not installed. Package apache2-mpm-prefork is not installed. Package apache2-mpm-event is not installed. Package apache2-mpm-itk is to be removed. (Reading database ... 48579 files and directories currently installed.) Removing apache2-mpm-itk ... [ ok ] Stopping web server: apache2 ... waiting . Selecting previously unselected package apache2-mpm-prefork. (Reading database ... 48583 files and directories currently installed.) Unpacking apache2-mpm-prefork (from .../apache2-mpm-prefork_2.2.22-13+deb7u2_amd64.deb) ... Setting up apache2-mpm-prefork (2.2.22-13+deb7u2) ... [ ok ] Starting web server: apache2.