logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> News & Hangout View previous topic :: View next topic
Reply to topic   Topic: [Rad hat] How to install Apache 2.2.3 & PHP 5.1.4
Author
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 16 Aug '06 9:19    Post subject: [Rad hat] How to install Apache 2.2.3 & PHP 5.1.4 Reply with quote

How to install Apache 2.2.3 & PHP 5.1.4 under Red hat linux

Login as root
Download the newest Apache Unixsource (.tar.gz) from httpd.apache.org
unpack with
Code:

tar xvfz httpd-2.2.3.tar.gz -C /root


In the new source folder
Code:

./configure --prefix=/usr/local/apache \
   --enable-so   \
   --enable-cgi   \
   --enable-info   \
   --enable-rewrite   \
   --enable-speling   \
   --enable-usertrack   \
   --enable-deflate \
   --enable-ssl   \
   --enable-mime-magic


Code:

make


Code:

make install


Download/unpack PHP source from the PHP website, http://www.php.net/
Pick the latest from the 5.x series.

unpack it
Code:

tar xvfz php-5.1.4.tar.gz -C /root


In the new source folder
Code:

./configure \
   --with-apxs2=/usr/local/apache/bin/apxs \
   --with-mysql \
   --prefix=/usr/local/apache/php \
   --with-config-file-path=/usr/local/apache/php \
   --enable-force-cgi-redirect \
   --disable-cgi \
   --with-zlib \
   --with-gettext \
   --with-gdbm


You only need the --with-apxs2, and prefix lines. --with-mysql adds MySql, --with-config-file moves the php.ini file location, disable-cgi disables the CGI version, which is not needed if you use Apache modules. It also enables and installs the command line interface (CLI) version. --with-zlib allows use of gzip-type compression, --with-gettext is for internationalization, and --with-gdbm allows access to GDBM databases. For more information, type ./configure --help and see the "Installation" chapter in the PHP Manual, http://ww.php.net/docs.php

Code:

make


Code:

make install


Add these directives are in /usr/local/apache/conf/httpd.conf (if already there, verify they are correct):
Code:

# Use for PHP 5.x:
LoadModule php5_module        modules/libphp5.so
AddHandler php5-script php
# (optional but useful for reading PHP source for debugging):
AddType application/x-httpd-php-source phps
 

# Add index.php to your DirectoryIndex line:
DirectoryIndex index.html index.php
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3094
Location: Hilversum, NL, EU

PostPosted: Wed 16 Aug '06 17:19    Post subject: Reply with quote

Not sure why you post a Linux install on a Apache2 on windows forum.
Any specific reason ? Just curious.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 17 Aug '06 9:29    Post subject: Reply with quote

1)I had to do that! And it wasn't easy at all. So maybe it is usefull for someone
2)above the forum startpage: All flavors of OS are welcome here
Back to top
ali_fareed



Joined: 04 Jul 2006
Posts: 61
Location: Bahrain

PostPosted: Sun 20 Aug '06 22:12    Post subject: Reply with quote

I didnt use redhat before but cant you install apache directly using a package manager ? . I used ubuntu and suse installing apache is very easy in them just use the package manager.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Mon 21 Aug '06 9:16    Post subject: Reply with quote

Yes, of couse you can use RPM, and SUSE and some others have Apache with yum installer very easy, but if you want the newest version you have to compile it your self. On my fedora core==red hat, there was only PHP 5.0 and Apache 2.0.58. For development I need the newest versions. And if you run PHP 4 as cgi and PHP 5 as module you can use both to test your scripts!
Back to top


Reply to topic   Topic: [Rad hat] How to install Apache 2.2.3 & PHP 5.1.4 View previous topic :: View next topic
Post new topic   Forum Index -> News & Hangout