Setup a (new) ]project-open[ server from scratch

Briefly, these are the steps to go:

  1. System setup*: Get yourself the Ubuntu VMware appilance from Then, start the VMware and then continue in there.
  2. Install PostgreSQL: pg_install (same as...
  3. Install AOLserver: aolserver_install (same as...
  4. Install Project-Open: po_setup
Note *: this step is optional, VMware is just a recommendation. Either way, you need to set up a system to get ]po[ working.

1. System set up

You can install these programs on any common operative system. You can use a VM (Virtual Machine) environment as well, for instance, VirtualBox. My recommendation would be to get yourself the latest Ubuntu VMware image and start from there.

Note that you should do yourself a favour and familiarize yourself with each of these steps. This is why there is no condensed script which you could just run for yourself.

2. & 3. Install PostgreSQL and AOLserver

The first thing you need to do before continuing is to setup your AOLserver and PostgreSQL system according to our instructions. Why? Only then we can make sure that you will not run into any problems due to missing libraries or inconsistency with regards to versions.

The AOLserver will be running in version 4.5 with TCL 8.5. PostgreSQL version will be 8.2. These are not versions which you will find on a VMware and you need to install them in parallel!

If you are now concerned, be advised that you can always go back as the installation instructions found on this site will install both AOLserver as well as PostgreSQL in it's own version directory. You might have to do it on a different machine though than the one running your production environment if you want to run both in parallel or be familiar with changing the port for PostgreSQL.

4. Install Project-Open

Setup web environment

To start with we need to make sure the directories for the web environment are present. AOLserver usually stores the ]project-open[ files in /var/lib/aolserver which is LSB compliant. We additionally add a link from /web/ there for pure convenience.

umask 022
sudo mkdir /var/lib/aolserver
sudo ln -s /var/lib/aolserver /web

Setup user

Especially for incoming e-mail, each webserver should run with it's own user. We are going to use the service name "projop" throughout this script to denote a couple of things needed to run your webserver "":

  • username to run the service (change from projop to whatever you like)
  • username in the database 
  • database name in postgresql 
  • service name for aolserver

As we are only running Ubuntu / Debian systems, we will limit the instructions to these platforms. First add the unix user:

export SERVICE0=projop
sudo useradd $SERVICE0sudo mkdir /var/lib/aolserver/$SERVICE0/
sudo chown -R $SERVICE0.web /var/lib/aolserver/$SERVICE0
sudo usermod -g web $SERVICE0
sudo usermod -d /var/lib/aolserver/$SERVICE0 $SERVICE0
sudo usermod -s /bin/bash $SERVICE0

Prepare the database

Now it is time to prepare the database for the OpenACS System:

# If you are using PG 8.0 don't use the -s switch below
/usr/local/pg82/bin/createuser -s $SERVICE0 -U postgres
/usr/local/pg82/bin/createdb -E UNICODE -U $SERVICE0 $SERVICE0

If you get an error from psql that it can't connect to /var/run/postgresql/s.PGSQL.5432 or something similar, link both up.

sudo ln -s /tmp/.s.PGSQL.5432 /var/run/postgresql/.s.PGSQL.5432

Get the source code

After the user is setup, login as this user and get the source files. Furthermore configure the config file.

sudo su - $SERVICE0

To get the sourcecode, check out the latest versions

chmod 755
mv openacs-4/* .
rm -rf openacs-4
svn co (change to po server)
psql -f database-backup/projop.dmp -U projop projop

Setup config files

Now you have your checkout, time to configure.

cp etc/config.tcl etc/`whoami`.tcl    
perl -pi*.bak -e "s/service0/`whoami`/g" etc/`whoami`.tcl   
perl -pi*.bak -e "s/service0/`whoami`/g" etc/daemontools/run   
perl -pi*.bak -e "s/config/`whoami`/g" etc/daemontools/run
cp etc/ etc/backup-`whoami`.sh    
perl -pi*.bak -e "s/service0/`whoami`/g" etc/backup-`whoami`.sh   
perl -pi*.bak -e "s/`whoami`/g" etc/backup-`whoami`.sh   
perl -pi*.bak -e "s/thisserver/`whoami`/g" etc/backup-`whoami`.sh

Edit etc/`whoami`.tcl for that and change at least the port, e.g. to port 8000 and the IP address.

set httpport                  8000
set address         

As root make sure the system is under daemontools control:

# Logout to become root again
sudo ln -s /var/lib/aolserver/$SERVICE0/etc/daemontools /service/$SERVICE0
sudo svgroup web /service/*

You are now configured to start your OpenACS installation on unless some other server has been running there.

Installing .LRN

If you want to install .LRN issue the following command:

su - $SERVICE0
cp packages/dotlrn/install.xml .
svc -du /service/`whoami`

Server Log

You can verify that your server is running by looking at

  • /var/lib/aolserver/$SERVICE0/log/error.log

If you want to edit your config files, here is their location:

  • /var/lib/aolserver/SERVICE0/etc/SERVICE0.tcl
    This contains the configuration parameters and is usually referred to as "config" file.

If you made changes to the IP Address and the port you will need to edit this file:

  • /var/lib/aolserver/SERVICE0/etc/daemontools/run
    add the "-b" switch to match your ip address and port right after "nsd-postgres", before the "-it ..." part

Setup Backup

Now it is time to configure the backup of your server

sudo mkdir /backup/$SERVICE0
sudo chown -R $SERVICE0.web /backup/$SERVICE0

Automated and remote backup

Now it is time to setup the backup and keepalive correctly. First edit /var/lib/aolserver/$SERVICE0/etc/keepalive/keepalive-config.tcl to include your server.

Then copy /var/lib/aolserver/$SERVICE0/etc/ to /var/lib/aolserver/$SERVICE0/etc/backup-$ and edit it to reflect your environment:

cp /var/lib/aolserver/$SERVICE0/etc/ /var/lib/aolserver/$SERVICE0/etc/backup-$

Last but not least login as $SERVICE0 and edit the crontab

su - $SERVICE0
export EDITOR=emacs
crontab -e  

File in the following data, replacing service0 where occurring.


# m h  dom mon dow   command
02 4 * * *           /var/lib/aolserver/service0/etc/
*/7 * * * *          /var/lib/aolserver/service0/etc/keepalive/keepalive-cron

  Contact Us
  Project Open Business Solutions S.L.

Calle Aprestadora 19, 12o-2a

E-08907 Hospitalet de Llobregat (Barcelona)

 Tel Europe: +34 932 202 088
 Tel US: +1 415 429 5995