# 解压缩安装包 tar zxvf php-5.5.0.tar.gz # 进入目录 cd php-5.5.0 # 编译安装 ./configure \ --prefix=/usr/local/webserver/php-d/php-5.5.0 \ --with-config-file-path=/usr/local/webserver/php-d/php-5.5.0/etc \ --with-config-file-scan-dir=/usr/local/webserver/php-d/php-5.5.0/etc/php.d \ --with-curl=/usr/local/lib \ --with-freetype-dir=/usr/lib64 \ --with-gd \ --with-gettext \ --with-iconv-dir=/usr/local/lib \ --with-jpeg-dir=/usr/lib64 \ --with-kerberos \ --with-ldap \ --with-ldap-sasl \ --with-libdir=lib64 \ --with-libxml-dir=/usr/lib64 \ --with-mcrypt \ --with-mhash \ --with-mysql \ --with-mysqli \ --with-openssl \ --with-pcre-regex=/usr \ --with-pdo-mysql=shared \ --with-pdo-sqlite=shared \ --with-pear=/usr/local/lib/php \ --with-png-dir=/usr/lib64 \ --with-xmlrpc \ --with-xsl \ --with-zlib \ --enable-fpm \ --enable-bcmath \ --enable-libxml \ --enable-inline-optimization \ --enable-gd-native-ttf \ --enable-mbregex \ --enable-mbstring \ --enable-opcache \ --enable-pcntl \ --enable-shmop \ --enable-soap \ --enable-sockets \ --enable-sysvsem \ --enable-xml \ --enable-zip \ --disable-rpath make ZEND_EXTRA_LIBS='liconv' make install cp php.ini-production /usr/local/webserver/php-d/php-5.5.0/etc/php.ini