CentOS5.2:PHP5.2.9 ソースインストール

yumで入れたPHP5.1上でSQLiteを使おうとしたらエラーとなり、phpinfo()をみたら「–without-sqlite」。
ありえん。
しょうがないのでソースから再度インストールすることに。
ついでにfreetypeとか使いそうなオプションも付加。

■必要パッケージインストール
configureでnot foundなどでエラーとなるパッケージを思う様インストール

yum -y install gcc
yum -y install httpd-devel
yum -y install libxml2-devel
yum -y install bzip2-devel
yum -y install curl-devel
yum -y install gmp-devel
yum -y install mysql-devel
yum -y install postgresql-devel
yum -y install libjpeg-devel
yum -y install libpng-devel
yum -y install freetype-devel
yum -y install libmcrypt-devel
yum -y install unixODBC-devel
yum -y install pspell-devel
yum -y install libtool-ltdl-devel
yum -y –enablerepo=rpmforge install t1lib t1lib-devel

■PHPインストール

./configure \
–with-openssl \
–with-freetype-dir=/usr \
–with-mysql \
–with-pgsql \
–enable-calendar \
–enable-exif \
–enable-ftp \
–enable-mbregex \
–enable-mbstring \
–enable-shmop \
–enable-sockets \
–enable-sysvmsg \
–enable-sysvsem \
–enable-sysvshm \
–enable-wddx \
–enable-zend-multibyte \
–prefix=/usr \
–with-apxs2 \
–with-bz2 \
–with-config-file-path=/etc \
–with-gettext \
–with-iconv \
–with-mcrypt \
–with-mime-magic=/usr/share/file/magic.mime \
–with-gd \
–with-jpeg-dir=/usr \
–with-zlib \
–enable-gd-jis-conv \
–enable-gd-native-ttf \
–with-t1lib \
–with-ttf \
–with-ldap \
–enable-dba \
–with-db4 \
–program-prefix= \
–exec-prefix=/usr \
–bindir=/usr/bin \
–sbindir=/usr/sbin \
–sysconfdir=/etc \
–datadir=/usr/share \
–includedir=/usr/include \
–libdir=/usr/lib \
–libexecdir=/usr/libexec \
–localstatedir=/var \
–sharedstatedir=/usr/com \
–mandir=/usr/share/man \
–infodir=/usr/share/info \
–cache-file=../config.cache \
–with-pic \
–with-gmp \
–with-curl \
–with-exec-dir=/usr/bin \
–without-gdbm \
–with-pspell \
–with-layout=GNU \
–with-kerberos \
–with-unixODBC=/usr \
–enable-magic-quotes \
–enable-ucd-snmp-hack \

make
make install

■httpd.conf編集&再起動
vi /etc/httpd/conf/httpd.conf

module php5_module is already loaded, skipping
をコメントアウト

/etc/rc.d/init.d/httpd restart