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/

原博客以下:php

···········mysql

# 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 -p1sql

# 將php-5.2.10-fpm-0.5.11.diff.gz以補丁形式加到php-5.2.10裏面app

# 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-pearcurl

注:Nginx+PHP整合,在安裝時必須啓用-–enable-fastcgi和--enable-fpm,這兩個選項是作什麼的上面已經描述。執行完後系統會提示-–enable-fastcgi是一個未知選項,咱們沒必要理會。socket

#注:make的時候必定要加上後面的參數,才能成功。
# make ZEND_EXTRA_LIBS='-liconv'
# make install
# cp php.ini-dist /usr/local/php/etc/php.ini
# cd ../url

··················spa

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-iconv-dir=/usr/local/bin/
相關文章
相關標籤/搜索