打印

LNMP问题反馈必读

本主题由 licess 于 2017-6-6 08:31 关闭
内核: Linux ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux
系统版本: Ubuntu 11.04
操作系统是32位的。log2M,无法上传。说下错误信息吧。错误信息:
复制内容到剪贴板
代码:
root@ubuntu:~/lnmp0.7-full/php-5.2.17# /root/lnmp restart
=========================================================================
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 [local]1[/local]

Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
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: 行 46: /usr/local/php/sbin/php-fpm: 没有那个文件或目录
PHP-FPM start successfully!
Starting MySQL
. *
MySQL start successfully!
在这个论坛上找了好几天知道大概是php没有安装成功,按步骤重新安装,证明这些方法全是不可行,(PS:发现这论坛上面说的大部分是没用的)

我查看/root/lnmp-0.7-full/ubuntu.sh ,按照:
复制内容到剪贴板
代码:
echo "========================= php + php extensions install ==================="
cd $cur_dir
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 --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

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
ln -s /usr/local/php/bin/phpize /usr/bin/phpize
ln -s /usr/local/php/sbin/php-fpm /usr/bin/php-fpm

cd $cur_dir
tar zxvf memcache-3.0.5.tgz
cd memcache-3.0.5/
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
cd ../

tar zxvf PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2/
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql
make && make install
cd ../

# php extensions
sed -i 's#extension_dir = "./"#extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/"\nextension = "memcache.so"\nextension = "pdo_mysql.so"\n#' /usr/local/php/etc/php.ini
sed -i 's#output_buffering = Off#output_buffering = On#' /usr/local/php/etc/php.ini
sed -i 's/post_max_size = 8M/post_max_size = 50M/g' /usr/local/php/etc/php.ini
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 50M/g' /usr/local/php/etc/php.ini
sed -i 's/;date.timezone =/date.timezone = PRC/g' /usr/local/php/etc/php.ini
sed -i 's/short_open_tag = Off/short_open_tag = On/g' /usr/local/php/etc/php.ini
sed -i 's/; cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /usr/local/php/etc/php.ini
sed -i 's/max_execution_time = 30/max_execution_time = 300/g' /usr/local/php/etc/php.ini

if [ `getconf WORD_BIT` = '32' ] && [ `getconf LONG_BIT` = '64' ] ; then
        wget -c http://soft.vpser.net/web/zend/ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz
        tar zxvf ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz
        mkdir -p /usr/local/zend/
        cp ZendOptimizer-3.3.9-linux-glibc23-x86_64/data/5_2_x_comp/ZendOptimizer.so /usr/local/zend/
else
        wget -c http://soft.vpser.net/web/zend/ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
        tar zxvf ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
        mkdir -p /usr/local/zend/
        cp ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_2_x_comp/ZendOptimizer.so /usr/local/zend/
fi

cat >>/usr/local/php/etc/php.ini<<eof
;eaccelerator

;ionCube

[Zend Optimizer]
zend_optimizer.optimization_level=1
zend_extension="/usr/local/zend/ZendOptimizer.so"
EOF

wget -c http://soft.vpser.net/lnmp/ext/init.d.php-fpm5.2
cp init.d.php-fpm5.2 /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm
echo "======================== php + php extensions install =================="
复制内容到剪贴板
代码:
./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
最后出现:
configure: error: libjpeg.(a|so) not found.
再往下无法继续执行:
复制内容到剪贴板
代码:
root@ubuntu:~/lnmp0.7-full/php-5.2.17# make ZEND_EXTRA_LIBS='-liconv'
make: *** 没有指明目标并且找不到 makefile。 停止。
最后,不仅仅期待你的回答,更期待正确的解决方案,另外,希望不要复制别人的或者说些不具体的话,我已经用google查了好多天了,所以不要浪费我的时间!!!

另:php -v 执行情况
复制内容到剪贴板
代码:
root@ubuntu:~/lnmp0.7-full/php-5.2.17# php -v
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0
PHP
Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib/php5/20090626+lfs/mysql.so' -
/usr/lib/php5/20090626+lfs/mysql.so: cannot open shared object file: No
such file or directory in Unknown on line 0
PHP Warning:  PHP
Startup: Unable to load dynamic library
'/usr/lib/php5/20090626+lfs/mysqli.so' -
/usr/lib/php5/20090626+lfs/mysqli.so: cannot open shared object file: No
such file or directory in Unknown on line 0
PHP Warning:  PHP
Startup: Unable to load dynamic library
'/usr/lib/php5/20090626+lfs/pdo_mysql.so' -
/usr/lib/php5/20090626+lfs/pdo_mysql.so: cannot open shared object file:
No such file or directory in Unknown on line 0
PHP 5.3.5-1ubuntu7.2 with Suhosin-Patch (cli) (built: May  2 2011 23:18:30)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
刚安装是可以查看php版本的,只是后来我升级了,以为能解决此问题。

[ 本帖最后由 sbmzhcn 于 2011-5-22 16:00 编辑 ]

TOP

另:php -v 执行情况
复制内容到剪贴板
代码:
root@ubuntu:~/lnmp0.7-full/php-5.2.17# php -v
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/mysql.so' - /usr/lib/php5/20090626+lfs/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/mysqli.so' - /usr/lib/php5/20090626+lfs/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/pdo_mysql.so' - /usr/lib/php5/20090626+lfs/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.3.5-1ubuntu7.2 with Suhosin-Patch (cli) (built: May  2 2011 23:18:30)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
刚安装是可以查看php版本的,只是后来我升级了,以为能解决此问题。

[ 本帖最后由 sbmzhcn 于 2011-5-22 15:55 编辑 ]

TOP