环境准备:
) B0 x8 C4 u4 ~yum groupinstall "Development tools"% X# ^9 { p! O5 }7 S
yum install libxml2-devel gd-devel libmcrypt-devel libcurl-devel openssl-devel
8 k& o( s q3 ?
# ^5 _' T* f" E( n: m9 K% w, G) p软件包:3 v2 m4 W" n3 [6 \9 S$ n2 s/ Y# v0 v
wget http://us3.php.net/get/php-5.6.9.tar.gz/from/cn2.php.net/mirror- m+ Q! v4 X0 b' _5 B+ W
tar -xvf php-5.6.9.tar.gz
& D- m9 O. d6 p' P1 ~" k$ ucd php-5.6.9: q+ w6 U4 `' n( a' r& D* g0 }
7 z! U4 H, B. u3 ]编译安装 php 5.6.9 的参数:4 Z0 Z! {7 c M
" |. Y: K% s" B/ r9 J[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
" t- h8 s! t( n3 h; I5 p6 q/ J, `: C2 ?5 c6 x/ l, c
make
8 ^" v+ G7 O1 m3 Z! Nmake install- N: |5 x+ }, G; V: x7 i( c$ h+ v
--enable-maintainer-zts 此句意思有线程安全版本,开启后ZendGuardLoader不能使用!
4 P8 _6 t. B+ p# _ |