If you're from a Windows background, then chances are that you've never actually played around with Linux and Apache. Apache is the most popular web server software in the world, and in this article Nakul's going to teach us exactly what Apache is, where to download it from and how to install it. If you've never used Apache before then you should definetly have a read of this article: it will have you up and running in no time!
Apache 101 - Installing and running Apache (Page 4 of 6 )
Those of you running the RedHat Linux distribution may want to take advantage of RedHat's RPM (RedHat Package Manager) system. Almost identical to a binary, an RPM is further customized to play nicely with other RPM's and provides a consistent interface for installing, updating, and removing binaries. They often entail a loss of flexibility and clarity; for instance, it's not readily apparent where the contents of some packages will end up. That said, for Linux newcomers or when installing a small standard component, RPMs are simple, reliable, and are the way to go.
Bear in mind that an Apache RPM may already be installed on your system depending on how Linux was originally installed. To find if one is installed type the following command at the shell prompt:
rpm -qa | grep apache
If you see "apache-1.3.9xxx", then an Apache RPM has already been installed and you can skip onto the next section, starting Apache.
If you don't have an Apache RPM, then you must obtain one. RedHat 6.x onwards ships with Apache-1.x.x-x.i386.rpm in the RedHat/RPMS directory on the installation CD. Alternatively, you can point your Web browser at RedHat's FTP site and pick yourself up a copy.
It takes just three more commands to install an Apache RPM instead of a binary distribution, and it saves you from the arduous task of figuring out which binary is the right one for your particular operating system.
Point your Web browser at http://www.apache.org/dist and download the gzipped file of the current version of Apache. Let's now uncompress that archive using gunzip and tar. You should replace the apache_1.3.11.tar.gz below with the name of the gzipped file that you downloaded.
gunzip < apache_1.3.11.tar.gz | tar xvf -
You should end up with an apache_1.3.x directory, with "x" being the particular sub-version of Apache you downloaded. Move into the newly created directory with the cd command, like this:
Now we'll use configure and make commands to configure, make, and install Apache. If you've not already done so, now would be the time to login as root.
Your screen should look something like this:
Configuring for Apache, Version 1.3.11...
Creating Configuration.apaci in src
Creating Makefile in src
+ configured for Linux platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ checking for system header files
+ adding selected modules
+ checking sizeof various data types
+ doing sanity check on compiler and options ...
Creating Makefile in src/modules/standard
Unless errors are reported (not warnings, mind you), your Apache installation is now configured and we can move on. This is where it gets a bit complex. We need to use the makefile that was generated from the configure command above to actually install Apache. The make command produces screens full of scary-looking output, but don't worry: as long as the process doesn't stop suddenly with an error message, then all is as it should be.