NOTICE: there are some modification in this introduction (Last Update Feb.18)


Introduction to Apache

In Apache.tar package:

servers  configure files for FrontEnd to take these machines as servers. They will be read in by mod_on_off module. You can change "time shutdown" and "time wakeup" in these files. For individual work, they are should be 0. But for group work, you must take them as variables to design your algorithm.

mm-1.3.1 shared memory library. It has been already installed on the clusters in advanced.

mod_backhand-1.2.2-new allows seamless redirection of HTTP requests from one web server to another. You will implement your distributed algorithm in this folder, in builtins.c.

mod_cpufreq-new  when a request arrives, the function in this module named cpufreq_post_read_request() will be called.

mod_on_off-new implement turn on/off algorithm here.


Installation of Apache

The shared memory library has been installed for this project in advanced. What you are expected to install are Apache and FrontEnd. (I will use the path "/afs/cs.pitt.edu/changliu/public/project" and "/tmp/changliu" as examples in the following introduction.)

For each machine (l1.mate.cs.pitt.edu ~ l15.mate.cs.pitt.edu), you must do:

Logon the machine by your cs account.

Copy apache.tar file you get from the project webpage into one of your folder. (e.g. for me, it's: /afs/cs.pitt.edu/changliu/public/project)

untar apache.tar. By doing this, there will be a new folder named "apache" under your assigned path. (e.g. /afs/cs.pitt.edu/changliu/public/project/apache) After untar apache.tar, all source codes for installation are in "apache" folder.

Before you install Apache, You must do the following modifications in the reinstall scripts. And Make sure that you don't run any reinstall scripts on two different machines at the same time.

change the current path to the path where your source code for Apache is. E.g. /afs/cs.pitt.edu/usr0/changliu/public/project/apache. By using command "cd "

run reinstall script in your source code folder, make sure you see the information for successful installation:

(if you get error in this command, you may want to run "csh reinstall" since your shell is not csh.)

Run "reinstall" on each machine

Now, you must install FrontEnd on l1.mate.cs.pitt.edu.

  ./reinstall-front-end

(again, if you get error in this command, you may want to run "csh reinstall-front-end" since your shell is not csh.)

After successful installation, you will see the installed path for Apache from its output information. And using the following command to run Apache on each machine (e.g. l1.mate.cs.pitt.edu)

/tmp/username/bin/apachectl start (e.g. /tmp/changliu/apache/bin/apachectl start)

to start Apache on the current machine.

if you want to stop Apache, you should use "/tmp/username/bin/apachectl stop" to stop the Apache on the current machine which you run this command on.

you can go to this webpage "http://l1.mate.cs.pitt.edu:1024/backhand/"(l1~l15) and will see Apache is online. Webpage for FrontEnd lists status information for all servers. But webpages for servers don't list that.

re-run ./reinstall and ./reinstall-front-end scripts after your modifications for codes.