[已解决]Debian安装lnmp0.6仍然502错误
系统环境:Debian GNU/Linux 6.0 \n \lSMP Sun Dec 19 11:10:29 CET 2010 x86_64 GNU/Linux
一键自动安装后,应该是php没有成功安装。
/usr/local/php下面没有sbin等文件夹
会报/usr/local/php/sbin/php-fpm文件夹不存在
我从另一台机器把/usr/local/php整个文件夹copy到此机器上
/root/lnmp restart
出现下面
Starting LNMP...
Nginx is successful start!
Starting php_fpm /usr/local/php/sbin/php-fpm: line 44: /usr/local/php/bin/php-cgi: No such file or directory
failed
Starting MySQL...
---------------
还是php没有启动成功,但是上面报错的两个文件都有。
请求帮助!
感谢
-------------------------------------
debian自动升级后
php需要新版本的automake来编译,如果在debian上遇到此问题,需要手动升级automake后,再编译php。
我的问题已经解决!
现将大致方法告之!
首先卸载automake
apt-get remove automake
cd /usr/src
wget http://files.directadmin.com/ser ... utoconf-2.61.tar.gz
tar xzf autoconf-2.61.tar.gz
cd autoconf-2.61
./configure --prefix=/usr
make
make install
然后重新编译php-fpm
tar zxvf php-5.2.14.tar.gz
gzip -d ./suhosin-patch-5.2.14-0.9.7.patch.gz
gzip -cd php-5.2.14-fpm-0.5.14.diff.gz | patch -d php-5.2.14 -p1
cd php-5.2.14/
patch -p 1 -i ../suhosin-patch-5.2.14-0.9.7.patch
./buildconf --force
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic --enable-suhosin
make
make install
mkdir -p /usr/local/php/etc/
cp php.ini-dist /usr/local/php/etc/php.ini
strip /usr/local/php/bin/php-cgi
cd ../
ln -s /usr/local/php/bin/php /usr/bin/php
-----------------------------------
另一个方法,已经测试成功
修改/debian.sh中的:
./buildconf --force
为:
PHP_AUTOCONF=autoconf213 PHP_AUTOHEADER=autoheader213 ./buildconf --force
重新安装lnmp
[ 本帖最后由 copperfiled 于 2011-2-17 14:45 编辑 ]
回复 1# 的帖子
手动编译php看看有什么提示copy其他机器上的目录是肯定不行的。
回复 2# 的帖子
使用手动编php的./configure --enable-fpm --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl -with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf -with-openssl --with-mhash -enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic --enable-suhosin
出现下列的东西
Notice: Following unknown configure options were used:
--enable-discard-path
--enable-fastcgi
--enable-force-cgi-redirect
--with-mime-magic
--enable-suhosin
使用enalbe-fpm
提示-bash: enalbe-fpm: command not found
回复 2# 的帖子
在make install的时候出现
virtual memory exhausted: Cannot allocate memory
make: *** Error 1
回复 4# 的帖子
你内存不够用了。:(回复 5# 的帖子
我的是256M内存,应该是够用的才对呀!free -m
还有100多呢!
回复 6# 的帖子
ulimit -a 执行看看virtual memory是不是unlimited,不是的话执行下面:ulimit -v unlimited ,再重新编译。
回复 7# 的帖子
vps一直是ulimit -v unlimited我注意到一个问题automake的版本低导致php-fpm不能正常编译。
但是升级automake后,仿佛成功了,但是机器重启后php又不能工作了!
/usr/local/php/sbin/php-fpm start重新开始它,出现下列错误!
Starting php_fpm Feb 13 21:55:35.386182 fpm_unix_conf_wp(), line 124: please specify user and group other than root, pool 'default'
[ 本帖最后由 copperfiled 于 2011-2-13 21:56 编辑 ] 我也遇到这个同样的问题,我用的是lnmp0.5
请问怎么升级automake啊?系统也是debian6的
回复 9# 的帖子
用lnmp0.6试试,你的是哪家的vps?回复 9# 的帖子
请看第一楼!你的VPS是国外还是国内的 怎么改啊
页:
[1]