Web Server Administration: Apache Install Lab

Apache Install Lab

This lab shows you how to install Apache on a Unix machine. Installing on a Windows machine is slightly different; you usually dont have to compile the source code first. We'll be installing a source version (not compiled) on our Solaris server.

Ive downloaded a copy of the apache source distribution on the webmaster server. To

install, well each copy it to our home directory and compile it.

1) Copy the apache distribution to your home directory:

~ cp /tmp/apache.tar.gz ~

 

2) Uncompress the file using the gzip command:

~ gzip d apache.tar.gz

3) Untar the file using the tar command:

~ tar xvf apache.tar

4) Change into the apache directory:

~ cd apache

Do an "ls" to show the contents of the directory:

~ ls

5) Now run the "configure" program to set up the environment:

~ ./configure --prefix=/export/home/ericl/apache  (replace "ericl" with your username)


This pre-compilation step sets up the sources files to be compiled

6) Now run the make command to compile the source into executables:


~ make

7) If everything compiles ok, you are ready to install the server into it's installation directory (The prefix that was specified)


~ make install

You now have a apache directory under your home directory which contains the web server software

8) The only necessary change you need to make before starting the server is to the ~/apache/etc/httpd.conf file:


Change the line that says "Port 8080" to have your UID number as the the Port #.  To find out your UID number just type "id" at the command prompt.  My UID is 1025, so I would change the line to read:
Port 1025

To avoid slowing down the server unnecessarily you should change the following settings too:
MinSpareServers 1


MaxSpareServers 5
StartServers 1