Monday, August 24, 2009

Install PHP 5.3 on CentOS

A couple days ago I compiled and installed PHP 5.3 with MySQL and SOAP support on a CentOS box since its not available in Yum repo. Here is some notes and problem I encountered. My configuration:

./configure --with-mysql=shared --enable-pdo --with-pdo-mysql=shared --with-mcrypt=shared --with-mhash=shared --with-gd=shared --enable-soap=shared --with-config-file-path=/etc/ --with-jpeg-dir=/usr/lib/ --with-apxs2 -–with-mysqli --enable-zip -–enable-shared


The only problem I ran into other than installing all the dependencies is libxml2 library that PHP depends on is currently not available in Yum repo you will have to download it and install manually.

wget ftp://xmlsoft.org/libxml2/LATEST_LIBXML2
tar -xf LATEST_LIBXML2
cd libxml2-x.x.x
./configure
make
sudo make install

No comments: