环境准备:
, H2 e- D$ W1 L6 ~# Dyum groupinstall "Development tools"- M! Z0 k d) a3 N
yum install libxml2-devel gd-devel libmcrypt-devel libcurl-devel openssl-devel$ {6 `: h! w; G; L$ H7 T* g+ {
3 J& }. |- }5 c1 |
软件包:
; y; g3 ?, G: @ N m* ^) Z; D4 J) Lwget http://us3.php.net/get/php-5.6.9.tar.gz/from/cn2.php.net/mirror
2 I! o. }) N; n7 g' N+ ztar -xvf php-5.6.9.tar.gz3 R* |: P3 v9 y6 B8 c p
cd php-5.6.9
! t7 w. a( S7 K; P
8 c9 z# e# B# a& z2 f) z编译安装 php 5.6.9 的参数:$ d5 S; `: j0 Q, @
" ~( y( Q- k3 y
[Bash shell] 纯文本查看 复制代码
./configure --prefix=/webserver/php-5.6.9 --with-config-file-path=/webserver/php-5.6.9/etc --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-zlib --with-curl --with-ldap --with-imap --with-kerberos --with-imap-ssl --with-gettext --with-gd --enable-gd-native-ttf --with-freetype-dir --with-jpeg-dir --with-png-dir --with-openssl --with-iconv=/usr/local --with-pcre-dir --with-mhash --with-mcrypt --with-xmlrpc --with-imap --enable-xml --enable-ftp --enable-mbstring --enable-soap --enable-sockets --enable-fpm --enable-zip --disable-debug --enable-calendar --enable-static --enable-inline-optimization --enable-wddx --enable-opcache --enable-bcmath --enable-shmop --enable-sysvsem --enable-mbregex --enable-pcntl --without-pear --enable-ctype
8 F$ M- G2 t4 ]! Z0 @$ W8 d }5 K
" ~8 m3 z; u1 u! Omake5 Z7 u; r, O2 \: H
make install
5 n' U2 W' ?( b1 w+ ]& |) o! v--enable-maintainer-zts 此句意思有线程安全版本,开启后ZendGuardLoader不能使用!
+ e! C8 d5 r4 b) J y |