环境准备:$ H' b6 s* l4 A* O6 S* M4 c7 {
yum groupinstall "Development tools"& @' {2 G( f3 a8 B( \) i A) r$ o
yum install libxml2-devel gd-devel libmcrypt-devel libcurl-devel openssl-devel
& l# q6 P9 D, I2 S! E' K
5 K9 N1 o5 v0 ]+ N软件包: k. h( _9 r) v
wget http://us3.php.net/get/php-5.6.9.tar.gz/from/cn2.php.net/mirror
' O0 r* _% u9 ptar -xvf php-5.6.9.tar.gz
. x: y" ~! m5 u { E) Kcd php-5.6.9: c; l C- L4 r% v$ s' p
$ ] C7 j- @3 S/ V% F编译安装 php 5.6.9 的参数:
# N# U& D+ E2 l
3 `# X0 A) b. K; j5 V[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
# p$ J9 n3 z/ [& i7 o
) i. b) d% |9 P) [make$ }+ \0 t& p) ~8 S
make install
& Y Q+ ~5 I' S$ G. }5 O) \--enable-maintainer-zts 此句意思有线程安全版本,开启后ZendGuardLoader不能使用!
$ y9 L# H5 H8 B |