环境准备:2 w) R7 ~) o j) z* g
yum groupinstall "Development tools"
( k" Y2 Y' D& u, Xyum install libxml2-devel gd-devel libmcrypt-devel libcurl-devel openssl-devel
) z5 F# I6 K6 ?! } a( ^# W9 t. ?6 n2 n- L4 S# V
软件包:
) ?6 k; j/ _/ v6 o2 Q0 I: ywget http://us3.php.net/get/php-5.6.9.tar.gz/from/cn2.php.net/mirror
/ y) N U* ]% a1 e( l1 |tar -xvf php-5.6.9.tar.gz
% N" y7 f" h' o0 Tcd php-5.6.9
k# q. e5 X& T- O
( U0 y$ ]" U$ [) v/ t: Z' I1 L编译安装 php 5.6.9 的参数:5 I7 J! O+ }/ J/ P
# |$ U5 A* L3 S. b+ Z+ 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
' i! b( b! R! D& Y8 f$ T
2 ]7 U1 Q- h1 F4 y- Rmake* s) {- w' E5 L' p
make install
! Y: m: l: |9 v: i! [" R5 K6 W--enable-maintainer-zts 此句意思有线程安全版本,开启后ZendGuardLoader不能使用!
9 f, c/ Y- k2 d2 \) {) n8 J' c |