VPS侦探论坛

 找回密码
 注册
查看: 11711|回复: 13

军哥,强烈求助啊!

[复制链接]
发表于 2011-1-22 16:56:59 | 显示全部楼层 |阅读模式

为了lnmp,我又重装了,应该算是最新版本的Debian Linux了,系统信息如下:
Debian
版本 5.0.7 (lenny)
内核 Linux 2.6.26-2-686
GNOME 2.22.3
硬件
内存:1011.5MB
处理器:intel(R) Pentium(R) CPU 2.40GHz
系统状态
可用磁盘空间:7.8GB

安装完成后打开http://127.0.0.1/ 默认页正常但打开链接探针 phpinfo phpMyAdmin 仍然是502 Bad Gateway,

php-fpm.conf文件中的这段代码:
<value name="listen_address">/tmp/php-cgi.sock</value>
我查了下,tmp目录下没有php-cgi.sock这个文件或目录

还有一个奇怪的现象是安装好lnmp后,打开新立得软件包管理器,提示有一个软件损坏(libpcre3-dev,版本7.6-2.1)安装log在附件中,麻烦军哥和各位前辈帮忙看下究竟是怎么回事,谢谢大家!
另外,我是个新手,很多东西是在半知半解的情况下操作的,在安装Debian Linux的时候我是选择菜鸟级的安装,不知道搭载lnmp环境需要什么条件,请各位前辈多多指教指教,再次感谢各位!


[ 本帖最后由 konloned 于 2011-1-22 17:22 编辑 ]

本帖子中包含更多资源

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

x
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-1-22 17:01:46 | 显示全部楼层


忘了说了,我安装的是lnmp0.5完整版。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-1-23 13:04:50 | 显示全部楼层

没用过debian,一直用centos,,,用的是0.4,没发现你说的问题
刚买了个VPS,正在安装0.5,一会儿看有你说的问题没。我也都是用完整版
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-1-23 13:05:40 | 显示全部楼层



另外你的VPS是不是最小化安装的,如果不是,最好是用最小化安装,这样比较方便。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-1-23 21:00:29 | 显示全部楼层

回复 4# 的帖子


/usr/local/php/下面有什么内容?

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

 楼主| 发表于 2011-1-23 22:38:17 | 显示全部楼层

回复 5# 的帖子


/usr/local/php/下只有有一个etc文件夹,etc文件夹内只有两个文件:php.ini 和php-fpm.conf,就没有其它的了
 楼主| 发表于 2011-1-23 22:42:41 | 显示全部楼层

回复 4# 的帖子


最小化安装和完整安装我都试过了,涛声依旧。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-1-23 22:46:05 | 显示全部楼层

我今天安装也是这样子,我用一台服务器最小化安装的Centos5.4 32bit
安装LNMP是用在线安装的。
安装过程没看到有什么错误,安装完毕,打不开安装成功的页面,查看/usr/local/php/跟楼上一样的。。
应该是没安装成功~
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-1-23 22:53:48 | 显示全部楼层


我这里 /root/lnmp restart 之后提示:
konloned:~# /root/lnmp restart
=========================================================================
Manager for LNMP V0.5  ,  Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org

Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Reload LNMP...
Reload Nginx configure...
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful
Nginx program is reloding!
Shutting down MySQL..
Starting MySQL..
/root/lnmp: line 70: /usr/local/php/sbin/php-fpm: 没有那个文件或目录
konloned:~#
我安装过无数次,usr/local/php/ 下面从来没有过sbin目录,只有一个etc目录,etc目录内只有两个文件:php.ini 和php-fpm.conf,真的很郁闷。完整包安装/在线安装都是如此。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-1-24 03:11:54 | 显示全部楼层



我估计是PHP没有安装成功,就手动安装PHP:

cd /root/lnmp0.5
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 all 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 ../

终端执行该脚本,开始一路顺畅跑过,接下来的这些每个都提示要手动输入的命令该怎么写?
.................
php-5.2.14/server-tests-config.php
php-5.2.14/snapshot
php-5.2.14/php.gif
php-5.2.14/README.PARAMETER_PARSING_API
php-5.2.14/acconfig.h
php-5.2.14/README.PHP4-TO-PHP5-THIN-CHANGES
php-5.2.14/CREDITS
php-5.2.14/README.UPDATE_5_2
php-5.2.14/README.UNIX-BUILD-SYSTEM
php-5.2.14/buildconf.bat
konloned:~/lnmp0.5# gzip -d ./suhosin-patch-5.2.14-0.9.7.patch.gz
gzip: ./suhosin-patch-5.2.14-0.9.7.patch.gz: No such file or directory
konloned:~/lnmp0.5# gzip -cd php-5.2.14-fpm-0.5.14.diff.gz | patch -d php-5.2.14 -p1
patching file configure
Hunk #7 succeeded at 110645 (offset 1324 lines).
Hunk #8 succeeded at 118930 (offset 1324 lines).
Hunk #9 succeeded at 119634 (offset 1324 lines).
Hunk #10 succeeded at 119689 (offset 1324 lines).
patching file configure.in
The next patch would create the file libevent/ChangeLog,
which already exists!  Assume -R? [n]    <-------这里应该输入什么?
Apply anyway? [n]   <-------这里应该输入什么?
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file libevent/ChangeLog.rej
The next patch would create the file libevent/Makefile.am,
which already exists!  Assume -R? [n]    <-------这里应该输入什么?
Apply anyway? [n]   <-------这里应该输入什么?

在线急等!!!!!
发表于 2011-1-24 09:32:42 | 显示全部楼层

回复 10# 的帖子


直接输y 覆盖就行了
 楼主| 发表于 2011-1-24 11:15:21 | 显示全部楼层

军哥,我按照你的办法一路 Y 下去,usr/local/php/ 下面sbin目录还是没有创建,究竟问题出在哪呢?

补充:
我在重新编译PHP的时候发现有提示suhosin-patch-5.2.14-0.9.7.patch.gz这个包没找到,我查看root/lnmp0.5目录下只有个suhosin-patch-5.2.14-0.9.7.patch文件,没有suhosin-patch-5.2.14-0.9.7.patch.gz文件,于是我下载lnmp0.5-full版的解压找到一个suhosin-patch-5.2.14-0.9.7.patch.gz包,把它拷贝进root/lnmp0.5目录下面,再重新编译PHP,提示如下:

konloned:~/lnmp0.5# gzip -d ./suhosin-patch-5.2.14-0.9.7.patch.gz
gzip: ./suhosin-patch-5.2.14-0.9.7.patch already exists; do you wish to overwrite (y or n)? y  <-------------我这里输入y覆盖!!
    not overwritten
为什么会不能覆盖呢?我用的是root登录,应该不是权限不够的问题吧?

[ 本帖最后由 konloned 于 2011-1-24 11:34 编辑 ]
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-1-24 11:43:05 | 显示全部楼层

回复 12# 的帖子

还有啥错误提示发上来。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-1-24 15:23:11 | 显示全部楼层
原帖由 licess 于 2011-1-24 11:43 发表
还有啥错误提示发上来。


我执行 uninstall.sh卸载lnmp0.5,删除home目录下的wwwlogs和wwwroot目录,然后重启电脑再次安装lnmp0.5,这次我先把suhosin-patch-5.2.14-0.9.7.patch.gz文件放入root/lnmp0.5/下后安装,结果还是一样的:

konloned:~# /root/lnmp restart
=========================================================================
Manager for LNMP V0.5  ,  Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org

Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Reload LNMP...
Reload Nginx configure...
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful
Nginx program is reloding!
Shutting down MySQL..
Starting MySQL..
/root/lnmp: line 70: /usr/local/php/sbin/php-fpm: 没有那个文件或目录
konloned:~#
意思就是PHP一直没有安装成功?PHP目录下仍然是只有etc文件夹和文件夹下的php.ini和php-fpm.conf文件,sbin目录仍然没有创建成功。

wwwlogs目录下的nginx_error.log内容如下:

2011/01/24 14:45:12 [emerg] 22489#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/01/24 14:45:12 [emerg] 22489#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/01/24 14:45:12 [emerg] 22489#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/01/24 14:45:12 [emerg] 22489#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/01/24 14:45:12 [emerg] 22489#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/01/24 14:45:12 [emerg] 22489#0: still could not bind()
2011/01/24 14:50:17 [crit] 2506#0: *1 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: www.abc.com, request: "GET /p.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "127.0.0.1", referrer: "http://127.0.0.1/"
2011/01/24 14:50:23 [crit] 2506#0: *1 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: www.abc.com, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "127.0.0.1", referrer: "http://127.0.0.1/"
2011/01/24 14:50:26 [crit] 2506#0: *1 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: www.abc.com, request: "GET /phpmyadmin/ HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "127.0.0.1", referrer: "http://127.0.0.1/"
2011/01/24 15:14:17 [crit] 3179#0: *5 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: www.abc.com, request: "GET /p.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "127.0.0.1", referrer: "http://127.0.0.1/"
2011/01/24 15:14:21 [crit] 3179#0: *5 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: www.abc.com, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "127.0.0.1", referrer: "http://127.0.0.1/"
2011/01/24 15:14:24 [crit] 3179#0: *5 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: www.abc.com, request: "GET /phpmyadmin/ HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "127.0.0.1", referrer: "http://127.0.0.1/"

我查了下,tmp/php-cgi.sock确实没有,应该是php确实没有安装好,lnmp0.5是这样,lnmp0.5-full安装也是这样,

系统信息如下:
Debian
版本 5.0.7 (lenny)
内核 Linux 2.6.26-2-686
GNOME 2.22.3
硬件
内存:1011.5MB
处理器:intel(R) Pentium(R) CPU 2.40GHz
系统状态
可用磁盘空间:7.8GB
应该不会是空间不够的问题吧?

系统是全新安装的,没有安装其它东东,比如apache2都没有安装过,应该不会存在冲突的问题。

[ 本帖最后由 konloned 于 2011-1-24 15:38 编辑 ]

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

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-18 07:26 , Processed in 0.031405 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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