centos6.5 Installing PHP

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.