Topics

relative paths

Install PHP 5.3.10 with PHP-FPM on CentOS 6.2 64-bit

– Make sure to check Nginx, memcached and MYSQL posts.

– remove old version

#find installed packages
rpm -qa | grep php
#remove php packages
yum remove php php-devel php-cli php-pear php-common php-pdophp-xml php-gd

– download package from PHP.net

mkdir php
cd php
wget http://www.php.net/get/php-5.3.10.tar.bz2/from/us.php.net/mirror
tar jxf php-5.3.10.tar.bz2
cd php-5.3.10

#install PHP
./configure  \
	--with-zlib --with-curl --with-curlwrappers --enable-ftp --with-mysql --with-jpeg-dir --with-png-dir --with-gd --enable-gd-native-ttf --with-freetype-dir \
	--enable-zip --with-openssl --with-bz2 --enable-mbstring  \
	--enable-inline-optimization --disable-debug \
	--with-config-file-path=/etc \
	--enable-fpm --with-fpm-user=www --with-fpm-group=www --with-libdir=lib64;
make all install;

#add php-fpm service
cp  sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm
chmod 666 /usr/local/var/run

– Configure php-fpm