VPS侦探论坛

 找回密码
 注册
查看: 12051|回复: 11

[已解决]Debian安装lnmp0.6仍然502错误

[复制链接]
发表于 2011-2-10 09:41:16 | 显示全部楼层 |阅读模式

系统环境:Debian GNU/Linux 6.0 \n \l
SMP 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 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-2-10 11:00:45 | 显示全部楼层

回复 1# 的帖子



手动编译php看看有什么提示
copy其他机器上的目录是肯定不行的。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-2-10 11:27:54 | 显示全部楼层

回复 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
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-2-10 11:42:02 | 显示全部楼层

回复 2# 的帖子




在make install的时候
出现
virtual memory exhausted: Cannot allocate memory
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-2-11 09:09:57 | 显示全部楼层

回复 4# 的帖子


你内存不够用了。

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2011-2-12 12:16:13 | 显示全部楼层

回复 5# 的帖子


我的是256M内存,应该是够用的才对呀!
free -m
还有100多呢!
发表于 2011-2-12 12:38:35 | 显示全部楼层

回复 6# 的帖子


ulimit -a 执行看看virtual memory是不是unlimited,不是的话执行下面:
ulimit -v unlimited ,再重新编译。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-2-13 21:53:59 | 显示全部楼层

回复 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 [ERROR] fpm_unix_conf_wp(), line 124: please specify user and group other than root, pool 'default'

[ 本帖最后由 copperfiled 于 2011-2-13 21:56 编辑 ]
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-2-16 13:28:17 | 显示全部楼层


我也遇到这个同样的问题,我用的是lnmp0.5

请问怎么升级automake啊?系统也是debian6的

军哥运维代购:http://shop63846532.taobao.com/

发表于 2011-2-16 13:58:57 | 显示全部楼层

回复 9# 的帖子




用lnmp0.6试试,你的是哪家的vps?
 楼主| 发表于 2011-2-16 16:08:06 | 显示全部楼层

回复 9# 的帖子


请看第一楼!你的VPS是国外还是国内的
发表于 2011-4-19 12:44:01 | 显示全部楼层

怎么改啊

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-20 07:55 , Processed in 0.030097 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表