First, to install PHP preparation:
Rpm-qa zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel openssl-devel Libxslt-devel
Mysql,apache,libiconv requires source installation
Second, compile parameters
./configure \
--prefix=/application/php-5.6.13 \
--WITH-APXS2=/APPLICATION/APACHE/BIN/APXS \
--with-mysql=/usr/local/mysql \
--WITH-XMLRPC \
--WITH-OPENSSL \
--with-zlib \
--with-freetype-dir \
--WITH-GD \
--with-jpeg-dir \
--with-png-dir \
--with-iconv=/application/libiconv-1.14 \
--enable-short-tags \
--enable-sockets \
--ENABLE-SOAP \
--enable-mbstring \
--enable-static \
--ENABLE-GD-NATIVE-TTF \
--with-curl \
--with-xsl \
--ENABLE-FTP \
--with-libxml-dir
Third, make && make install
Iv. configuration Changes
Ln-s/application/php5.3.10/application/php
CP Php.ini-production/application/php/lib/php.ini
Modify Httpd.conf
grep php conf/httpd.conf
LoadModule Php5_module modules/libphp5.so
DirectoryIndex index.php index.html
AddType application/x-httpd-php. php. phtml
AddType Application/x-httpd-php-source. Phps
./bin/apachectl-t
Syntax OK
./bin/apachectl Graceful
httpd.conf about Htdocs Permissions
Order Allow,deny
Allow from all
This article is from the "Liuk Problem solving" blog, so be sure to keep this source http://liuk1303.blog.51cto.com/10449284/1697769
centos6.5 Installing PHP