张宴Nginx 0.8.x + PHP 5.2.13(FastCGI)搭建胜过Apache十倍的Web服务器(第6版)故障解决方案

进来准备研究Nginx,很早之前就听说张宴的大名。所以从网上baidu到张宴的blog地址,按照http://blog.s135.com/nginx_php_v6/文章一步步搭建,其中遇到很多问题,特此专门针对目前我的环境将遇到的问题一一整理,方便其他童靴学习。因为看到张宴很少回复他的blog了,估计太忙的缘故吧。这种事情就我来代劳了。

首先我的环境是Cent0S5.5 64位的
[root@host1 ~]# cat /etc/redhat-release
CentOS release 6.2 (Final)
[root@host1 ~]# uname -a
Linux host1.linuxbrother.com 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
1、# /data0/mysql/3306/mysql start 启动MySQL报错
/data0/mysql/3306/mysql: line 30: unexpected EOF while looking for matching `)'
/data0/mysql/3306/mysql: line 44: syntax error: unexpected end of file
是因为脚本里面&@124;是|,可能输转码问题导致,所以将文件中的&@124;全部替换成|
vim /data0/mysql/3306/mysql
......    
   kill -9 $(ps -ef | grep 'bin/mysqld_safe' | grep ${mysql_port} |awk '{printf $2}')
    kill -9 $(ps -ef |grep 'libexec/mysqld' | grep ${mysql_port} | awk '{printf $2}')
......
  printf "Usage: /data0/mysql/${mysql_port}/mysql {start|stop|restart|kill}\n"
2、# ./configure --prefix=/usr/local/webserver/php --with-config-file-path=/usr/local/webserver/php/etc --with-mysql=/usr/local/webserver/mysql --with-mysqli=/usr/local/webserver/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --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 --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap
报如下错误
configure: error: libjpeg.(a|so) not found.
configure: error: libpng.(a|so) not found.
configure: error: Cannot find ldap libraries in /usr/lib.
解决办法:
 cp -frp /usr/lib64/libldap* /usr/lib/
 cp -frp /usr/lib64/libjpeg.* /usr/lib/
 cp -frp /usr/lib64/libpng.* /usr/lib/
重新./configure OK
3、安装ImageMagick-6.5.1-2报错
BEGIN failed--compilation aborted at Makefile.PL line 24.
make[1]: *** [PerlMagick/Makefile] Error 2
make[1]: Leaving directory `/usr/src/ImageMagick-6.5.1-2'
make: *** [all] Error 2
# yum -y install perl-CPAN
 我在按照文档操作中就遇到这几个问题,谢谢张宴提供那么好的资料让我们学习。


 

本文出自 “CrazyLinux工作室” 博客,谢绝转载!

你可能感兴趣的:(PHP,nginx,fastcgi)