环境准备:% E! O; z# o* K! o. d9 m
yum groupinstall "Development tools"1 K1 }3 f, l6 Q6 b. O# H
yum install libxml2-devel gd-devel libmcrypt-devel libcurl-devel openssl-devel' p, u' B4 Q; ~" f/ K5 E
, p: a; l- o* p. H1 j软件包:
* ~8 J; n Q" m V4 m3 j% [) @wget http://us3.php.net/get/php-5.6.9.tar.gz/from/cn2.php.net/mirror- |# B8 y& H% l$ S/ ~% X0 K# z+ u
tar -xvf php-5.6.9.tar.gz- ?. a$ Z7 B5 [! r( m- R
cd php-5.6.9
# s0 T p, N k, {4 E0 I- L# e: m* s' d1 D9 u
编译安装 php 5.6.9 的参数:
+ B- b- w( F. k* G
9 q. v; [$ Y& U: t[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
; J6 s" ~$ W0 x& Q9 l
8 o: m& \) e* k ~7 L' Wmake! X. w# I/ J! `/ \+ O5 |
make install d' h v! H+ p+ b# b, @" v: {6 R/ F
--enable-maintainer-zts 此句意思有线程安全版本,开启后ZendGuardLoader不能使用!
. {# y1 \0 O( F5 y |