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