ntp vim-enhanced gcc gcc-c++ flex bison autoconf automake bzip2-devel ncurses-devel openssl-devel libtool*zlib-devel libxml2-devel libjpeg-devel libpng-devel libtiff-devel fontconfig-devel freetype-devel libxpm-develgettext-devel curl curl-devel pam-devel e2fsprogs-devel krb5-devel libidn libidn-devel libxslt-devel readline-devel gmp-devel
# tar xf php-5.4.13.tar.bz2
# cd php-5.4.13
# ./configure --prefix=/usr/local/php \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
--with-mhash \
--with-bz2 \
--with-curl \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-gmp \
--with-imap-ssl \
--with-jpeg-dir \
--with-mcrypt \
--with-sqlite3 \
--with-openssl \
--with-png-dir \
--with-readline \
--with-xmlrpc \
--with-xsl \
--with-zlib \
--with-mysql=/usr/local/mysql \
--enable-bcmath \
--enable-calendar \
--enable-ctype \
--enable-dom \
--enable-exif \
--enable-ftp \
--enable-gd-native-ttf \
--enable-intl \
--enable-json \
--enable-mbstring \
--enable-pcntl \
--enable-session \
--enable-shmop \
--enable-******xml \
--enable-soap \
--enable-sockets \
--enable-tokenizer \
--enable-wddx \
--enable-xml \
--enable-zip \
--enable-opcache \
--enable-maintainer-zts
ps:如果使用php5.3以上版本,為了鏈結mysql資料庫,可以指定mysqlnd,這樣在本機就不需要先安裝mysql或mysql開發包了。mysqlnd從php 5.3開始可用,可以編譯時繫結到它(而不用和具體的mysql客戶端庫繫結形成依賴),但從php 5.4開始它就是預設設定了。
例如: ./configure --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd
# make
# make test #時間巨長
directoryindex index.php index.html
而後重新啟動httpd,或重讀配置檔案測試php是否正常使用 PHP 編譯安裝PHP
1.安裝php所有的依賴軟體包 root web01 yum install zlib devel libxml2 devel libjpeg devel freetype devel libpng devel gd devel libcurl devel libxslt devel openssl...
PHP編譯安裝
錯誤1configure error xml2 config not found.please check your libxml2 installation.解決方案 yum install y libxml2 devel錯誤2 configure error cannot find openss...
編譯安裝PHP
2 確保安裝之前有安裝gd,png,curl,xml等等lib開發庫。如果不確定,執行以下命令 yum install gcc make gd devel libjpeg devel libpng devel libxml2 devel bzip2 devel libcurl devel y 3 編...