jingkoo 发表于 2011-5-2 15:30:42

LNMP0.7发现不能打开php文件

在CentOS安装的LNMP0.7 发现打开了的index.html能显示,但是php文件都显示 502 Bad Gateway
查看安装的日志文件最后显示
=========================================================================
Manager for LNMP V0.7,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}
=========================================================================
Nginx is runing!
php-fpm is stop!
MySQL running (15935)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State      
tcp      0      0 0.0.0.0:677               0.0.0.0:*                   LISTEN      
tcp      0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      
tcp      0      0 0.0.0.0:111               0.0.0.0:*                   LISTEN      
tcp      0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      
tcp      0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      
tcp      0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      
tcp      0      0 :::22   
然后重新启动了一遍提示
Stoping LNMP...
Nginx program is stop
PHP-FPM program is not runing!
Shutting down MySQL.                                       
MySQL program is stop
Starting LNMP...
Nginx start successfully!
/root/lnmp: line 46: /usr/local/php/sbin/php-fpm: No such file or directory
PHP-FPM start successfully!
Starting MySQL..                                          
MySQL start successfully!

刚接触LNMP大家给帮帮忙了!:(

jingkoo 发表于 2011-5-2 16:26:11

发现/usr/local/php
目录下就一个etc文件夹,没有sbin文件夹。是不是LNMP0.7必须要装LNMPA才能支持PHP没搞明白?

licess 发表于 2011-5-2 17:24:10

php没有安装成功,手动按脚本编译安装试试,看看有什么错误

jingkoo 发表于 2011-5-2 21:57:56

是再执行一遍
export PHP_AUTOCONF=/usr/local/autoconf-2.13/bin/autoconf
export PHP_AUTOHEADER=/usr/local/autoconf-2.13/bin/autoheader
tar zxvf php-5.2.17.tar.gz
gzip -cd php-5.2.17-fpm-0.5.14.diff.gz | patch -d php-5.2.17 -p1
cd php-5.2.17/
./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 --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
make ZEND_EXTRA_LIBS='-liconv'
make install
页: [1]
查看完整版本: LNMP0.7发现不能打开php文件