环境准备:
6 J [' e0 q4 W9 ^yum groupinstall "Development tools"$ ^& A+ s' ]( k* s5 A/ Y: F9 P. _: H
yum install libxml2-devel gd-devel libmcrypt-devel libcurl-devel openssl-devel; V' i# w0 o2 k
2 j2 s/ k p+ ]7 k5 e5 r. f软件包:
* `) p6 a2 o( d0 r/ M! s% y' g8 ewget http://us3.php.net/get/php-5.6.9.tar.gz/from/cn2.php.net/mirror8 P! L" z4 y0 `3 H. G+ F
tar -xvf php-5.6.9.tar.gz$ g* i8 E( Q# c/ _( f
cd php-5.6.9) n9 U' \. [2 J4 A |, l
5 x! g7 E5 E* @0 ^" l. r# m编译安装 php 5.6.9 的参数:. R& P. u% D; L. E) _+ f9 r
9 Y. ]1 p! ^* |5 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
" w i S$ K( j9 C6 X, T- U) C
, v& Q# ?1 V. T9 L* |. N
make
& m4 Q2 J7 u0 c1 t0 imake install
/ ^9 |1 ]; X. n8 d--enable-maintainer-zts 此句意思有线程安全版本,开启后ZendGuardLoader不能使用!
. d8 A: u6 b1 v7 W3 M7 G |