Especially for incoming e-mail, each webserver should run with it's own user. We are going to use the service name "service0" throughout this script to denote a couple of things needed to run your webserver "www.service0.com":
First add the unix user:
sudo useradd $SERVICE0
sudo 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
Now it is time to prepare the database for the OpenACS System:
Make sure to have PostgreSQL installed
Make sure to have Oracle installed
SQL> create tablespace $SERVICE0
SQL> create user $OPENACS_SERVICE_NAME identified by password default tablespace $OPENACS_SERVICE_NAME
SQL> grant connect, resource, ctxapp, javasyspriv, query rewrite to questaims;
SQL> revoke unlimited tablespace from questaims;
SQL> alter user questaims quota unlimited on questaims;
After the user is setup, login as this user and get the source files. Furthermore configure the config file.
sudo su - $SERVICE0
If you do this directly from OpenACS you can run:
cvs -d :pserver:email@example.com:/cvsroot co -r oacs-5-3 openacs-4
mv openacs-4/* .
If you want to use SVN you can run
svn co https://svn.cognovis.de/openacs/branches/oacs-5-3 .
If you are working within cognovis and start a new client project do the following
export REPOS=https://svn.cognovis.de/Now you have your checkout, time to configure
svn mkdir $REPOS/$SERVICE0 $REPOS/$SERVICE0 $REPOS/$SERVICE0/branches $REPOS/$SERVICE0/tags -m "Creating clientname directory structure"
svn copy $REPOS/openacs/branches/oacs-5-3 $REPOS/$SERVICE0/trunk
svn co $REPOS/$SERVICE0/trunk .
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
This will get the latest openacs from the current release branch
into your service name. If you need certain packages to come from HEAD
you can still update them later.
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 http://127.0.0.1:8000 unless some other server has been running there.
If you want to install .LRN issue the following command:
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
Last but not least make sure incoming E-Mail will work (for a full installation overview look at [en:incoming_email]. First add your domain to the virtual_domains in /etc/postfix/main.cf then execute the following commands:
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/backup.sh to /var/lib/aolserver/$SERVICE0/etc/backup-$SERVICE0.sh and edit it to reflect your environment.
Last but not least login as $SERVICE0 and edit the crontab
File in the following data, replaceing service0 where occuring.
To support webservices there exists the tool called "TWiST". To download and install it onto your server the following steps need to be taken:
svn checkout http://twsdl.googlecode.com/svn/tags/twist-0.9.9 twist-0.9.9
mv twist-0.9.9 twsdl
Then you need to edit your config file at /var/lib/aolserver/SERVICE0/etc/SERVICE0.tcl by adding the following in the modules section:
ns_param twsdl tcl