环境准备:6 c. E# v: V+ e. K6 P4 {
yum groupinstall "Development tools"4 B3 W0 G$ e I. l& N
yum install libxml2-devel gd-devel libmcrypt-devel libcurl-devel openssl-devel$ M8 J+ H& ^& s% W5 Z/ Y! T
7 `9 O5 }6 I: ]软件包:
2 f: M4 ^7 _3 M( U6 Xwget http://us3.php.net/get/php-5.6.9.tar.gz/from/cn2.php.net/mirror' j2 y- e: O/ z' Z, O0 @
tar -xvf php-5.6.9.tar.gz
) y! H3 H4 S3 @5 rcd php-5.6.9
8 s3 O. n) @8 W* n, T V; T+ g/ A9 J9 H
编译安装 php 5.6.9 的参数:
+ D$ K0 Q4 V6 p1 h" }2 M: }! L( ~7 D1 I3 q2 ~* i' Q. R+ |0 G
[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
4 @; L4 i* u5 U- z7 U% c
4 w5 N* \, m1 P9 D3 s6 }9 ?make6 a- P/ t1 d& S! X, k ^
make install
$ d' j; r) ]5 L/ q--enable-maintainer-zts 此句意思有线程安全版本,开启后ZendGuardLoader不能使用!
3 p+ B9 }+ a+ U2 F% N |