PHP Installation Prerequisites ====> need to successfully install MySQL first
Check the compilation libraries required to install PHP:
Yum install-y zlib-devel libxml2-devel libjpeg-turbo-devel libiconv-devel
Yum install-y freetype-devel libpng-devel gd-devel libcurl-devel
Check that the installation package is complete:
Rpm-qa zlib-devel libxml2-devel libjpeg-turbo-devel libiconv-devel freetype-devel libpng-devel gd-devel libcurl- Devel
Package files that cannot be installed with Yum;
Http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
Compile and install: libiconv-1.14.tar.gz//Character set conversion library file
Tar zxf libiconv-1.14.tar.gz
CD libiconv-1.14
./configure--prefix=/usr/local/libiconv
Make
Make install
Cd.. /
Compile and install the encryption library: libmcrypt-2.5.8.tar.gz
Tar zxf libmcrypt-2.5.8.tar.gz
CD libmcrypt-2.5.8
./configure
Make
Make install
Sleep2
/sbin/ldconfig
CD libltdl/
./configure--enable-ltdl-install
Make
Make install
Cd.. /.. /
You can choose Yum Install libmcrypt-devel-y but only if you need to install the Epel source
Wget-o/etc/yum.repos.d/epel.repo Http://mirrors.aliyun.com/repo/epel-6.repo//third party software Library
Compile and install mhash-0.9.9.9.tar.gz encryption extension Library
Tar zxf mhash-0.9.9.9.tar.gz
CD mhash-0.9.9.9/
./configure
Make
Make install
Quick Installation Method:
Yum Install Mhash mhash-devel-y
Compiling and installing mcrypt-2.6.8.tar.gz
Tar zxf mcrypt-2.6.8.tar.gz
CD mcrypt-2.6.8/
/sbin/ldconfig
./configure Ld_library_path=/usr/local/lib
Make
Make install
Cd.. /
Sleep2
Quick Installation Method:
Yum Install Mcrypt-y
Compile the parameter file:
./configure \
--prefix=/application/php5.3.27 \
--with-mysql=/application/mysql \
--with-iconv-dir=/usr/local/libiconv \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--with-zlib \
--WITH-LIBXML-DIR=/USR \
--enable-xml \
--disable-rpath \
--enable-safe-mode \
--enable-bcmath \
--ENABLE-SHMOP \
--enable-sysvsem \
--enable-inline-optimization \
--with-curl \
--with-curlwrappers \
--enable-mbregex \
--ENABLE-FPM \
--enable-mbstring \
--with-mcrypt \
--WITH-GD \
--ENABLE-GD-NATIVE-TTF \
--WITH-OPENSSL \
--with-mhash \
--ENABLE-PCNTL \
--enable-sockets \
--WITH-XMLRPC \
--enable-zip \
--ENABLE-SOAP \
--enable-short-tags \
--enable-zend-multibyte \
--enable-static \
--with-xsl \
--with-fpm-user=nginx \
--with-fpm-group=nginx \
--enable-ftp
+--------------------------------------------------------------------+
| License: |
| This software was subject to the PHP License, available in this |
| Distribution in the file LICENSE. By continuing this installation |
| Process, you is bound by the terms of this License agreement. |
| If you don't agree with the terms of this license, you must abort |
| The installation process at this point. |
+--------------------------------------------------------------------+
Thank for using PHP.
Action before make
Ln-s/application/mysql/lib/libmysqlclient.so.18/usr/lib64 Creating a libmysqlclient.so.18 soft connection
Touch Ext/phar/phar.phar
Make
Make install
The following text appears to indicate that the installation was successful:
[PEAR] structures_graph-installed:1.0.4
[PEAR] xml_util-installed:1.2.1
/home/oldboy/tools/php-5.3.27/build/shtool install-c Ext/phar/phar.phar/application/php5.3.27/bin
Ln-s-f/application/php5.3.27/bin/phar.phar/application/php5.3.27/bin/phar
Installing PDO headers:/application/php5.3.27/include/php/ext/pdo/
[[email protected] php-5.3.27]# echo $?
0
This article is from the "Savage Power" blog, please be sure to keep this source http://chenfei123.blog.51cto.com/1427669/1865543
Ultra-detailed PHP installation process to ensure successful installation