CGI PHP安装

./configure --with-php-config=/usr/local/php/bin/php-config--with-pdo-mysql=/usr/local/mysql

 

PDO——MYSQL

./configure --with-php-config=/usr/local/php/bin/php-config--with-pdo-mysql=/usr/local/mysql

 

./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=/usr/local--with-freetype-dir--with-jpeg-dir--with-png-dir--with-zlib--with-gd--enable-gd-native-ttf--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-openssl--with-mhash--enable-pcntl--enable-sockets--with-ldap--with-ldap-sasl--with-xmlrpc--enable-zip--enable-soap--without-pear

原博客是对的,只是太长了?
简短版:
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/ph                                                                              p/etc --with-mysql=/usr/local/mysql --with-iconv-dir=/usr/local/bin/

原博客如下:

···········

# tar zxvf php-5.2.10.tar.gz
# gzip -cd php-5.2.10-fpm-0.5.11.diff.gz | patch -d php-5.2.10 -p1

# 将php-5.2.10-fpm-0.5.11.diff.gz以补丁形式加到php-5.2.10里面

# cd php-5.2.10/
# ./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=/usr/local
--with-freetype-dir
--with-jpeg-dir
--with-png-dir
--with-zlib
--with-gd
--enable-gd-native-ttf
--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-openssl
--with-mhash
--enable-pcntl
--enable-sockets
--with-ldap
--with-ldap-sasl
--with-xmlrpc
--enable-zip
--enable-soap
--without-pear

注:Nginx+PHP整合,在安装时必须启用-–enable-fastcgi和--enable-fpm,这两个选项是做什么的上面已经描述。执行完后系统会提示-–enable-fastcgi是一个未知选项,我们不必理会。

#注:make的时候一定要加上后面的参数,才能成功。
# make ZEND_EXTRA_LIBS='-liconv'
# make install
# cp php.ini-dist /usr/local/php/etc/php.ini
# cd ../

··················

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-iconv-dir=/usr/local/bin/

 

posted @ 2015-12-03 15:35  九分  阅读(486)  评论(0编辑  收藏  举报