在Linux下安裝PHP,源代碼方式安裝,總需要配置很多參數。這裡列出常用配置參數,并詳細用中文解釋說明了。給大家一些參考./configure
--prefix=/usr/local/PHP php 安裝目錄
--with-apxs2=/usr/local/apache/bin/apxs
--with-config-file-path=/usr/local/PHP/etc 指定php.ini位置
--with-MySQL=/usr/local/mysql mysql安裝目錄,對mysql的支援
--with-MySQLi=/usr/local/mysql/bin/mysql_config mysqli檔案目錄,優化支援
--enable-safe-mode 打開安全模式
--enable-ftp 打開ftp的支援
--enable-zip 打開對zip的支援
--with-bz2 打開對bz2檔案的支援
--with-jpeg-dir 打開對jpeg圖檔的支援
--with-png-dir 打開對png圖檔的支援
--with-freetype-dir 打開對freetype字型庫的支援
--without-iconv 關閉iconv函數,種字元集間的轉換
--with-libXML-dir 打開libxml2庫的支援
--with-XMLrpc 打開xml-rpc的c語言
--with-zlib-dir 打開zlib庫的支援
--with-gd 打開gd庫的支援
--enable-gd-native-ttf 支援TrueType字元串函數庫
--with-curl 打開curl浏覽工具的支援
--with-curlwrappers 運用curl工具打開url流
--with-ttf 打開freetype1.*的支援,可以不加了
--with-xsl 打開XSLT 檔案支援,擴充了libXML2庫 ,需要libxslt軟體
--with-gettext 打開gnu 的gettext 支援,編碼庫用到
--with-pear 打開pear指令的支援,PHP擴充用的
--enable-calendar 打開月曆擴充功能
--enable-mbstring 多位元組,字元串的支援
--enable-bcmath 打開圖檔大小調整,用到zabbix監控的時候用到了這個子產品
--enable-sockets 打開 sockets 支援
--enable-exif 圖檔的中繼資料支援
--enable-magic-quotes 魔術引用的支援
--disable-rpath 關閉額外的運作庫檔案
--disable-debug 關閉調試模式
--with-mime-magic=/usr/share/file/magic.mime 魔術頭檔案位置
CGI方式安裝才用的參數
--enable-fpm 打上PHP-fpm 更新檔後才有這個參數,CGI方式安裝的啟動程式
--enable-fastCGI 支援fastcgi方式啟動PHP
--enable-force-CGI-redirect 同上 ,幫助裡沒有解釋
--with-ncurses 支援ncurses 螢幕繪制以及基于文本終端的圖形互動功能的動态庫
--enable-pcntl freeTDS需要用到的,可能是連結mssql 才用到
mhash和mcrypt算法的擴充
--with-mcrypt 算法
--with-mhash 算法
--with-gmp
--enable-inline-optimization
--with-openssl openssl的支援,加密傳輸時用到的
--enable-dbase
--with-pcre-dir=/usr/local/bin/pcre-config perl的正則庫案安裝位置
--disable-dmalloc
--with-gdbm dba的gdbm支援
--enable-sigchild
--enable-sysvsem
--enable-sysvshm
--enable-zend-multibyte 支援zend的多位元組
--enable-mbregex
--enable-wddx
--enable-shmop
--enable-soap