在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 ? ? ?魔術頭文件位置