编译安装PHP(FastCGI模式)

 需要下载的包
php-5.2.14,php.net下载
php-5.2.13-fpm-0.5.14.diff.gz,http://php-fpm.org/downloads/
tar zxvf php-5.2.13.tar.gz
gzip -cd php-5.2.13-fpm-0.5.14.diff.gz | patch -d php-5.2.14 -p1
cd php-5.2.13/
./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
make ZEND_EXTRA_LIBS='-liconv'
make install
cp php.ini-dist /usr/local/webserver/php/etc/php.ini
cd ../


如果出现下面的错误提示 
checking for xml2-config... no 
checking for xml-config... no 
configure: error: XML configuration could not be found
 
安装 
apt-get install libxml2-dev 
出现 
configure: error: Cannot find OpenSSL's <evp.h> 
安装 
apt-get install libssl-dev 
出现 
configure: error: Please reinstall the libcurl distribution - 
easy.h should be in <curl-dir>/include/curl/
 
安装 
apt-get install libcurl4-openssl-dev 
出现 
configure: error: libjpeg.(a|so) not found. 
安装 
apt-get install libjpeg62-dev 
出现 
configure: error: libpng.(a|so) not found. 
安装 
apt-get install libpng12-dev 
出现 
configure: error: freetype.h not found. 
安装 
apt-get install libfreetype6-dev 
出现 
configure: error: sasl.h not found! 
安装 
apt-get install libsasl2-dev
出现
mcrypt.h not found. Please reinstall libmcrypt.
安装
apt-get install libmcrypt-dev
出现
Please reinstall libmhash - I cannot find mhash.h
安装
apt-get install libmhash-dev





有什么问题可以加群,100852896
点击这里加入此群 在线提问
文章来自: 本站原创
Tags:
评论: 0 | 查看次数: 5002
博主QQ: 友情链接请找我
QQ群: 灰色档案
返回顶部 关闭