How to install PHP 5.6.9 and Apache httpd 2.4.12 on Oel6u6 x86 64bit

Source: Internet
Author: User

1. Install Apache httpd

2. Configure Apache HTTPD

3. Install PHP 5.6.9

4. Testing

1. Install Apache httpd

#Yum InstallApr apr-util#ls-L-rw-rw-r--.1None None5054838May +  .: athttpd-2.4. A.Tar. bz2#TarJXVF httpd-2.4. A.Tar. bz2 # CD httpd-2.4. A# ./configure--enable-module=so# Make#  Make Install

If you install APR and apr-util manually, you need to specify the location manually.

#./configure--enable-module=so--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util

2. Configure Apache HTTPD

Modify/usr/local/apache2/conf/httpd.conf as follows

127.0. 0.1
<ifmodule dir_module>    directoryindex index.php index.html</IfModule>

and add the following content

    AddType application/x-tar  . tgz    AddType application/x-httpd-php. php    AddType image /x-icon. ico

3. Install PHP 5.6.9

#ls-L-rw-rw-r--.1None None14037070May +  .: -php-5.6.9.Tar. bz2#TarJXVF php-5.6.9.Tar. bz2 # cd PHP-5.6.9# ./configure--prefix=/usr/local/php-5.6.9--with-apxs2=/usr/local/apache2/bin/apxs--enable-bcmath--enable-ctype--enable-sockets--enable-mbstring-- With-gettext--with-pgsql--WITH-GD--with-png-dir=/usr/local/php-gd/png--with-jpeg-dir=/usr/local/php-gd/jpeg--with-freetype-dir=/usr/local/php-gd/freetype

It prompts for a missing support environment and installs the Devel package on its own yum.

4. Testing

Create the/usr/local/apache2/htdocs/test.php as follows for testing.

<? PHP            Phpinfo ();? >

Launch Apache httpd:

#/usr/local/apache2/bin/apachectl–k start

Close Apache httpd:

#/usr/local/apache2/bin/apachectl–k Stop

.

How to install PHP 5.6.9 and Apache httpd 2.4.12 on Oel6u6 x86 64bit

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.