cd php-xx
(若安装pgsql,pdo-pgsql支持,要安装pear包就需要安装zlib)
./configure
--prefix=/usr/local/php
--with-pgsql=/usr/local/pgsql
--with-pdo-pgsql=/usr/local/pgsql/bin
--with-apxs2=/usr/local/apache2/bin/apxs
--enable-mbstring=all
--enable-mbregex
--with-gd
--with-freetype-dir=/usr/local
--with-jpeg-dir=/usr/local
--with-png-dir=/usr/local
--enable-gd-native-ttf
--enable-gd-imgstrttf
--with-zlib
--with-ttf
--with-gdbm
--with-gettext
--with-iconv
--with-png
--with-xml
--enable-calendar
make
make install
外挂模块安装
(以下以pgsql为例)
cd /ext
cd pgsql
phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-pgsql=/usr/local/pgsql
make
make install
安装pear Mail包
由于Mail 包之间有依赖性,所以在安装的时候要注意安装顺序
下面是我的安装过程
[root@host118 files]# ls
Mail-1.2.0b1.tar Mail_mimeDecode-1.5.0 myscript.php Net_Socket-1.0.9.tar php-5.2.6.tar.gz testa
Mail_Mime-1.5.2.tar Mail_mimeDecode-1.5.0.tar Net_SMTP-1.3.1.tar package.xml phpinfo.txt testb
[root@host118 files]# pear install Net_Socket-1.0.9.tar
install ok: channel://pear.php.net/Net_Socket-1.0.9
[root@host118 files]# pear install Net_SMTP-1.3.1.tar
Did not download optional dependencies: pear/Auth_SASL, use --alldeps to download automatically
pear/Net_SMTP can optionally use package "pear/Auth_SASL"
install ok: channel://pear.php.net/Net_SMTP-1.3.1
[root@host118 files]# pear install Mail-1.2.0b1.tar
Did not download optional dependencies: pear/Net_SMTP, use --alldeps to download automatically
install ok: channel://pear.php.net/Mail-1.2.0b1
[root@host118 files]# pear install Mail_Mime-1.5.2.tar
pear/Mail_Mime requires package "pear/Mail_mimeDecode"
No valid packages found
install failed
[root@host118 files]# pear install Mail_mimeDecode-1.5.0
[root@host118 files]# pear install Mail_mimeDecode-1.5.0.tar
pear/Mail_mimeDecode requires package "pear/Mail_Mime" (version >= 1.4.0, excluded versions: 1.4.0)
No valid packages found
install failed
[root@host118 files]# pear install Mail_mimeDecode-1.5.0.tar Mail_Mime-1.5.2.tar
install ok: channel://pear.php.net/Mail_mimeDecode-1.5.0
install ok: channel://pear.php.net/Mail_Mime-1.5.2