LNMP环境搭建(CentOS 6.5 64bit Nginx MySQL5.1.62 PHP-5.3.16)

==========PHP-5.3.16==#编译#安装#配置#FAQ#======================================

#编译#安装#

cd /usr/local/src
tar zvxf php-5.3.16.tar.gz
cd php-5.3.16
mkdir -p /usr/local/webserver/php

./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-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-pdo-mysql=/usr/local/webserver/mysql/ --with-mysql-sock=/tmp/mysql.sock
make ZEND_EXTRA_LIBS= ‘-liconv ‘
make install
cp php.ini-production /usr/local/webserver/php/etc/php.ini

cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm #因为php5.3开始自带fpm,使用自带的管理脚本
chmod +x /etc/init.d/php-fpm
chkconfig php-fpm on #设置开机自启动
cp /usr/local/webserver/php/etc/php-fpm.conf.default /usr/local/webserver/php/etc/php-fpm.conf

#配置#

#FAQ#

<1Q>onfigure: error: xml2-config not found. Please check your libxml2 installation.
<1A>yum -y install libxml2-devel.x86_64

<2Q>configure: error: Cannot find OpenSSL‘s <evp.h>

<2A>yum install openssl-devel.x86_64

<3Q>

configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/

<3A>yum -y install libcurl-devel.x86_64

<4Q>configure: error: jpeglib.h not found.

<4A> yum -y install libpng-devel.x86_64

<5Q>

 

LNMP环境搭建(CentOS 6.5 64bit Nginx MySQL5.1.62 PHP-5.3.16),古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。