Below the installation configuration method, I tried for a night without success, probably because my system environment is more complex, so it is recommended that:
Install PHP first. Use the Yum command to install, in the installation configuration MySQL, the specific approach to look at the blog other articles, as the Nginx server can install the two after the installation configuration, because I currently do not use Nginx, directly using the Apache server, so there is no compilation on the system installed Nginx, Currently using WordPress, do not need nginx, as long as the PHP and MySQL installation configuration is good, you can;
1. Download the PHP Dependency library:
wget http://soft.beauty-soft.net/lib/libiconv/libiconv-1.13.1.tar.gz
wget http://soft.beauty-soft.net/lib/mcrypt/libmcrypt-2.5.8.tar.gz
wget http://soft.beauty-soft.net/lib/mcrypt/mcrypt-2.6.8.tar.gz
wget http://soft.beauty-soft.net/lib/mhash/mhash-0.9.9.9.tar.gz
wget http://soft.beauty-soft.net/lib/libiconv/php-5.3.6.tar.gz
2. Install after download:
Tar zxvf libiconv-1.13.1.tar.gz
CD LIBICONV-1.13.1/
./configure--prefix=/usr/local
Make
Make install
Cd.. /
Tar zxvf libmcrypt-2.5.8.tar.gz
CD libmcrypt-2.5.8/
./configure
Make
Make install
/sbin/ldconfig
CD libltdl/
./configure--enable-ltdl-install
Make
Make install
Cd.. /.. /
Tar zxvf mhash-0.9.9.9.tar.gz
CD mhash-0.9.9.9/
./configure
Make
Make install
Cd.. /
Ln-s/usr/local/lib/libmcrypt.la/usr/lib/libmcrypt.la
Ln-s/usr/local/lib/libmcrypt.so/usr/lib/libmcrypt.so
Ln-s/usr/local/lib/libmcrypt.so.4/usr/lib/libmcrypt.so.4
Ln-s/usr/local/lib/libmcrypt.so.4.4.8/usr/lib/libmcrypt.so.4.4.8
Ln-s/USR/LOCAL/LIB/LIBMHASH.A/USR/LIB/LIBMHASH.A
Ln-s/usr/local/lib/libmhash.la/usr/lib/libmhash.la
Ln-s/usr/local/lib/libmhash.so/usr/lib/libmhash.so
Ln-s/usr/local/lib/libmhash.so.2/usr/lib/libmhash.so.2
Ln-s/usr/local/lib/libmhash.so.2.0.1/usr/lib/libmhash.so.2.0.1
Ln-s/usr/local/bin/libmcrypt-config/usr/bin/libmcrypt-config
Tar zxvf mcrypt-2.6.8.tar.gz
CD mcrypt-2.6.8/
/sbin/ldconfig
./configure
Make
Make install
Cd.. /
3. Install PHP: The PHP-FPM extension must be added, as well as the corresponding extension of MySQL database;
Tar zxvf php-5.3.6.tar.gz
CD php-5.3.6
./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc--with-freetype-dir--with-jpeg-dir --with-png-dir--with-zlib--with-libxml-dir=/usr--enable-xml--disable-rpath--enable-discard-path-- Enable-magic-quotes--enable-safe-mode--enable-bcmath--enable-shmop--enable-sysvsem--enable-inline-optimization --with-curl--with-curlwrappers--enable-mbregex--enable-fastcgi--enable-fpm--enable-force-cgi-redirect-- Enable-mstring--with-mcrypt--enable-ftp--with-gd--enable-gd-native-ttf--with-openssl--with-mhash--enable-pcntl --enable-sockets--with-xmlrpc--enable-zip--enable-soap--without-pear--with-gettext--with-mime-magic-- With-mysql=mysqlnd--with-mysqli=mysqlnd--with-pdo-mysql=mysqlnd
4. Execution error: Configure:error:xml2-config not found. Please check your LIBXML2 installation.
Workaround:
5. Execution error: Configure:error:libjpeg. (A|SO) not found.
Workaround:
6. Execution error: Configure:error:libpng. (A|SO) not found.
Workaround: Ln-s/usr/lib64/libpng.so/usr/lib/libpng.so
Make zend_extra_libs= '-liconv '
7. Execution error: Make: * * * [Ext/dom/node.lo] Error 1
Workaround: Before you install the patch command to Linux: yum-y install patch
8. Execution error: Make: * * * [sapi/cgi/php-cgi] Error 1
Workaround:
Make install
Install PHP in the Linux environment with Nginx configuration