Instalar las dependencias y el software para compilar

yum groupinstall "Development Tools"


yum install libxml2-devel libXpm-devel gmp-devel libicu-devel t1lib-devel aspell-devel openssl-devel bzip2-devel libcurl-devel libjpeg-devel libvpx-devel libpng-devel freetype-devel readline-devel libtidy-devel libxslt-devel libmcrypt-devel pcre-devel curl-devel mysql-devel ncurses-devel gettext-devel net-snmp-devel libevent-devel libtool-ltdl-devel libc-client-devel postgresql-devel libxml-devel curl curl-devel perl-XML-Tidy libtidy libtidy-devel gd-devel libzip-devel

 

Configurarlo. El directorio de instalacion sera: /opt/php-5.6.3

./configure --prefix=/opt/php-5.6.3  --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --with-libdir=lib64 --disable-debug --with-pic --without-pear --with-freetype-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-pcre-regex=/usr --with-zlib --with-layout=GNU --enable-exif --enable-ftp  --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --with-kerberos  --enable-shmop --enable-calendar --with-libxml-dir=/usr --enable-xml  --enable-fpm --without-mysql --with-gd --enable-gd-jis-conv  --without-pspell  --disable-posix --disable-sysvmsg --disable-sysvshm --disable-sysvsem --with-pgsql  --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --with-mysql --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-xsl --with-openssl --with-fpm-user=nginx --with-fpm-group=nginx --with-libdir=lib64 --enable-ftp --with-imap --with-imap-ssl --with-gettext --enable-fpm  --enable-pdo --without-pdo-sqlite --enable-dom --with-pear --with-curl --enable-soap --enable-zip --with-tidy

Compilarlo e instalarlo:

 

make -j64
make install