Fall Semester 2007


Week One: Installing and maintaining Apache.

This week we install Apache.

We first need to have a silo account created.

Once this is done, we log in and start typing Unix commands.

The first command I usually type is clear.

The Knowledge Base has information about basic Unix commands.

We start by typing makenobackup and have /nobackup/[username] created for us.

We move there: cd /nobackup/[username].

We use ls -l to look around: the new folder is empty.

We copy the compressed archive to our workspace:

cp /l/www/classes/a348/sum2006/software/httpd* /nobackup/[username]

We now need to uncompress the archive: gunzip *.tar

Next, we unarchive the archive: tar xvf *.tar which creates a new folder.

We move into the new folder: cd httpd-2.2.2

We need to configure, compile and install the compiled files in the right place(s) now.

Create a new file: pico try

In it write the three commands:

./configure --prefix=/u/[username]/apache --enable-so
make
make install

Exit pico, run the file: ./try

This only works if the file is executable, so let's make it so: chmod 700 try

When this process ends Apache is installed in /u/[username]/apache.

We now need to configure Apache.

Open the file ~/apache/conf/httpd.conf and make the following changes:

Exit, then open ~/apache/conf/extra/httpd-mpm.conf.

Update the LockFile line to point to a local file.

Now you can start your server: ~/apache/bin/apachectl start

You can check that it's running with: ps -ef | grep [username].

(Recall that in all our examples [username] needs to be replaced with your actual username.

Your server keeps HTML documents in ~/apache/htdocs so go there.

Look around, you will only find a few pictures and an index.html file.

Edit your index.html file. Check it on-line, through a browser.

Now remove your index.html file. Reload the page in the browser. What do you see?

Exercises:


Last updated: Aug 30, 2007