362
Networking: A Beginner's Guide
3. Unzip the gz file using the following command (substitute the actual filename
of the file you downloaded):
gunzip filename.tar.gz
4. Untar the resulting .tar file with the following command (substituting the ac-
tual filename found in the directory after performing step 3; you can use the ls
command to see its name):
tar -xvf filename.tar
5.
The tar command in step 4 creates a directory that has the same name as the
name and version portion of the tar file. Change to that directory, as follows
(change the command to match your downloaded version):
cd /httpd-2.2.3
6. Run the Apache configuration script by entering the following command (it
will take only a few seconds to run):
./configure
7. Now you need to prepare the binaries by compiling them. This takes two com-
mands, each of which might take several minutes to complete:
Make
make install
8. At this point, Apache is installed but not yet running. To start Apache, execute
the following command from any directory:
/usr/local/apache/bin/apachectl start
To test your Apache installation, you can use the ps command to verify that the
daemons are running:
ps -e |more
The ps command will display all running processes. Because the preceding
command pipes the output of ps -e through the more command, you might need to
press the spacebar a number of times to see all of the running processes. In the output,
you should see one or more copies of a process called httpd, which is the Apache
daemon. You might see many of these processes, because Apache usually starts a
number of them, depending on the computer on which you have installed Apache, but
this is perfectly normal.
After you've verified that Apache has started, you can also test it using a web
browser. Enter either of the following web addresses:
http://127.0.0.1
http://localhost