張宴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
 我在按照文檔操作中就遇到這幾個問題,謝謝張宴提供那麼好的資料讓我們學習。


 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章