Home arrow Apache arrow Page 4 - Apache 101
APACHE

Apache 101


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!

Author Info:
By: Nakul Goyal
Rating: 4 stars4 stars4 stars4 stars4 stars / 26
March 07, 2002
TABLE OF CONTENTS:
  1. · Apache 101
  2. · What is Apache?
  3. · Getting Apache
  4. · Installing and running Apache
  5. · Performance settings
  6. · Conclusion

print this article
SEARCH DEVARTICLES

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:

cd apache_1.3.x

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.

./configure

Your screen should look something like this:

# ./configure

Configuring for Apache, Version 1.3.11...

Creating Makefile

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.

Your screen should now look something like this:

# make

===> src

make[1]: Entering directory 'src/httpd/apache_1.3.11'

make[2]: Entering directory 'src/httpd/apache_1.3.11/src'

===> src/regex ...

[several lines later] ...

gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite

-DNO_DL_NEEDED '../apaci' -o ab -L../os/unix

-L../ap ab.o -lap -los -lm -lcrypt

make[2]: Leaving directory 'src/httpd/apache_1.3.11/src/support'

<=== src/support

make[1]: Leaving directory 'src/httpd/apache_1.3.11'

<=== src

#

We're not ready to install our Apache build. We do so with another make command, like this:

# make install

And that's all there is to it. Apache is now installed on our machine and is ready to roll.
blog comments powered by Disqus
APACHE ARTICLES

- Programmatically Manipulating Microsoft Exce...
- Installing PHP under Windows
- Compressing Web Content with mod_gzip and mo...
- Compressing Web Output Using mod_deflate and...
- Setting Up Apache 2.0.45 to Parse PHP Pages
- Custom Error 404 Documents with PHP
- Using Apache and PHP on Mac OS X
- ASP: Active Sessions, Active Logins and Tota...
- Working With Oracle on Windows: Part 1
- The Quick-n-Dirty Guide to Setting Up Apache...
- Installing Apache With SSL: The Complete Gui...
- 7 Powerful .htaccess Customization Tips
- Trap And Get Notified: A Practical Solution ...
- One Way To Use Server Side Includes
- Using ForceType For Nicer Page URLs

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials