OCT (Online Conference Toolkit)

Installation and Configuration

This guide walks you through the steps for installing and configuring the OCT.

1. System Requirements 2. Create the Admin Account
3. Download Packages 4. Install AOLServer
5. Install Postgresql 6. Install Database Driver
7. Configure AOLserver 8. Install Keepalive
9. Set Processes to be Restarted 10. Where to Find Help

1. System Requirements

The OCT has been tested on Redhat Linux versions 6.2 and 7.1 running on an Intel machine with 128 Meg RAM and 4 Gigs free local harddisk space.

top

2. Create the Admin Account

The webserver software will execute as the user named octadmin. This user account will exist only on the machine that hosts the site, and all webmasters will administer the site as this single user.

Login as root, and type the following commands at the commandline: (NOTE: you can substitute any directory on your local harddisk as our "/scratch" directory.)

cd /scratch mkdir oct /usr/sbin/groupadd octadmin /usr/sbin/useradd -g octadmin -d /scratch/oct octadmin passwd octadmin chown octadmin oct

Logout as root, and login as octadmin. Then do:

cd

Add the following lines to the .bash_profile file (don't forget the leading period on the filename):

export OCT_HOME=/scratch/oct

Then, back at the commandline, do:

source .bash_profile mkdir pkg

top

3. Download Packages

OCT is comprised from a collection of free, open-source tools. Download the following into the newly created pkg directory:
Downloads
http://photo.net/wtr/thebook/utilities.txt
Save this file as utilities.tcl
http://www.openacs.org/software.adp
Click on AOLserver Postgres Driver 2.0.0
http://www.postgresql.org/sites.html
Click on a mirror and download the 8Meg source file for version 7.1
http://www.aolserver.com
Download version 3.4
http://people.csail.mit.edu/u/l/lzollei/public_html/oct/download/
Download keepalive.tar.gz and oct.tar.gz (and all the above files, in fact)

top

4. Install AOLServer

As octadmin, do the following (be sure you renamed the file pkg/utilities.txt to utilities.tcl):

tar xzvf aolserver-3.4.tar.gz cd $OCT_HOME/pkg cd aolserver-3.4 make make install INST=$OCT_HOME/aolserver cp ~/pkg/utilities.tcl ~/aolserver/modules/tcl

Test AOLServer by doing:

cd $OCT_HOME/aolserver ./bin/nsd -kt sample-config.tcl

Point your browser to: http://YOUR-MACHINE-NAME:8000 (but substitute your machine's name in place of YOUR-MACHINE-NAME, ie: http://oct.mit.edu:8000)

See it's threads by typing the following command (linux threads have differenct process IDs, or PIDs):

ps -aux | grep nsd

Stop it by looking up its main process's PID...

cat log/nspid.server1

...and killing it with the following command (substituting the PID you looked up in place of "YOUR-PID"):

kill -9 YOUR-PID

top

5. Install Postgresql

As octadmin, build the software by doing:

cd $OCT_HOME/pkg tar xzvf postgresql-7.1.tar.gz cd postgresql-7.1 ./configure --with-x --prefix=$OCT_HOME/pgsql --exec-prefix=$OCT_HOME/pgsql --libdir=$OCT_HOME/pgsql/lib make

As root, create the "postgre" user by doing:

/usr/sbin/groupadd web /usr/sbin/useradd -g web -d /scratch/oct/pgsql postgre passwd postgre mkdir pgsql chown postgre.web pgsql

As postgre, edit your profile by doing:

cd

Add to the .bash_profile file:

OCT_HOME=/scratch/oct LD_LIBRARY_PATH=$OCT_HOME/pgsql/lib export OCT_HOME LD_LIBRARY_PATH

Back at the command line, install the database by doing:

source .bash_profile cd $OCT_HOME/pkg/postgresql-7.1 make install cd mkdir data cd bin ./initdb -D $OCT_HOME/pgsql/data

Create the database for oct by doing the following.

$OCT_HOME/pgsql/bin/postmaster -S -D $OCT_HOME/pgsql/data createdb octdb createlang --pglib $OCT_HOME/pgsql/lib plpgsql octdb

Test your postgresql installation.
The following command will open an interactive terminal to the database, and the next command closes it.

psql octdb \q

When the interactive terminal was open, it should have looked like this: (if not, there is a problem)

Welcome to psql, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help on internal slash commands \g or terminate with semicolon to execute query \q to quit octdb=>

Create a database user for octadmin.
As postgre, do (with your own password in place of "MYPASS"):

psql octdb create user octadmin with password 'MYPASS'; \q

top

6. Install Database Driver

As octadmin, do:

cd $OCT_HOME/pkg tar xzvf pgdriver-2.0.tgz cd pgdriver-2.0 make NSHOME=$OCT_HOME/aolserver PGLIB=$OCT_HOME/pgsql/lib PGINC=$OCT_HOME/pgsql/include make install INSTALL=$OCT_HOME/aolserver

top

7. Configure AOLserver

As octadmin, unpack the OCT by doing:

cd $OCT_HOME/pkg tar xzvf oct.tar.gz cd $OCT_HOME/aolserver cp ~/pkg/oct/aolserver/* . chmod 755 init chmod 755 kill chmod 644 nsd.tcl cp -r ~/pkg/oct/servers/* servers

Edit the init and kill scripts to reflect your installation.

Edit nsd.tcl to replace the MailHost, hostname, and MYPASS (that you used for database access above).

Edit servers/oct/tcl/init.tcl to suit your conference. PLEASE read the file's comments for instructions!

Load Data Model into Database

If the next step fails, then copy libraries from /scratch/oct/pgsql/lib to /usr/local/pgsql/lib. Do the following as the postgre user:

cd $OCT_HOME/aolserver/servers/oct/pages/admin/sql psql octdb \i postgres.sql \q

Then, do this as the octadmin user:

cd $OCT_HOME/aolserver/servers/oct/pages/admin/sql psql octdb \i model.sql \dt \q

top

8. Install Keepalive

If you want to get fancy, install from http://www.arsdigita/free-tools/keepalive.html Otherwise, as octadmin, do:

cd $OCT_HOME/pkg tar xzvf keepalive.tar.gz cd $OCT_HOME/aolserver cp ~/pkg/keepalive/aolserver/* . chmod 755 ka-init chmod 755 ka-kill chmod 644 ka-nsd.tcl cp -r ~/pkg/keepalive/servers/* servers

Edit ka-init, ka-kill, and ka-nsd.tcl according to your installation.

Edit servers/ka/config.ini to replace MY-MACHINE-NAME, MY-EMAIL, and the path to ka-kill.

   

What Does Keepalive do?

Keepalive is another webserver that will test your OCT webserver every minute, and restart it automatically if it hangs. It will also email your site administrator when there are any problems.

top

9. Set Processes to be Restarted

If you restart your machine, or if there's a power outage, it's nice if all your processes have been configured to restart automatically.

As root, edit /etc/inittab to add lines similar to:

# Web Servers nsp1:2345:respawn:/scratch/oct/aolserver/init nsp2:2345:respawn:/scratch/oct/aolserver/ka-init

Then apply your changes by entering the following on the command line as root:

/sbin/init Q

This will restart AOLserver. As for the database, you can either restart it manually by typing the following as the postgre user...

$OCT_HOME/pgsql/bin/postmaster -S -D $OCT_HOME/pgsql/data

... OR automatically depending on your version of Linux. For example, on Redhat Linux version 7.xx, add this file renamed /etc/rc.d/init.d/postgresql, and then run "chkconfig --add postgresql".

If you encounter trouble starting the database, note that the postmaster process will not start if something happened to create a state where some old lock files are left over. For example, if the postmaster process is not running (you don't see the postmaster process listed when you type: ps -aux), but there are lock files existing as /tmp/.s.PGSQL.*, then you will need to become root to delete these lock files.

top

10. Where to Find Help

If you find any mistakes in this documentation, or any bugs in the OCT code, please notify David Gering (gering@ai.mit.edu).

The reason OCT (Online Conference Toolkit) is called a "Toolkit" instead of a "Tool" is because you can alter and extend it to fit your conference. Useful resources in this regard are:

Useful Resources
Learn TCL
Learn SQL
Ask a very knowledgable and helpful community about using PostgreSQL with AOLserver
AOLserver documentation
PostgreSQL documentation
Why use AOLserver instead of Apache?
Why use PostgreSQL instead of MySQL?

top