OpenACS Debian Install quicksheet
# PostgreSQL
apt-get install postgresql postgresql-dev postgresql-doc
ln -s /usr/include/postgresql/ /usr/include/pgsql
ln -s /var/lib/postgres /usr/local/pgsql
ln -s /usr/include/pgsql /usr/local/pgsql/include
su postgres -c "/usr/lib/postgresql/bin/createlang plpgsql template1"
su postgres -c "createuser -a -d service1"
su postgres -c "createdb -E UNICODE service1"
# AOLServer
apt-get install aolserver4 aolserver4-nspostgres aolserver4-nssha1 aolserver4-nscache tdom
# OpenACS
groupadd web
useradd -g web service1
mkdir /var/lib/aolserver
chown -R service1 /var/lib/aolserver
chgrp -R web /var/lib/aolserver
chmod -R 770 /var/lib/aolserver
exit
su - service1
cd /tmp
wget https://openacs.org/projects/openacs/download/download/openacs-5.1.5.tar.gz
cd /var/lib/aolserver
tar xzf /tmp/openacs-5.1.5.tar.gz
mv /tmp/openacs-5.1.5 service1
chmod -R 755 service1
chown -R service1.web service1
exit
# Copy Files (where / is root of OpenACS instance):
# [edit hostname and address]
config.tcl => /etc/
set homedir /usr/lib/aolserver4
set bindir /usr/lib/aolserver4/bin
# init/d script:
#!/bin/sh
#
# Start the AOLServer HTTP server.
#
NAME="OpenACS on service1"
SERVICEPATH=/var/lib/aolserver/service1
PATH=$PATH:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/pgsql/bin
trap "" 1
start()
{
echo -n "Starting web server: $NAME"
echo -e -n "\r"
#!/bin/sh#we need to export the library stuff first
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib
export PATH=$PATH:/usr/local/pgsql/bin
# give time for Postgres to come up
sleep 1
exec /usr/sbin/aolserver4-nsd -it $SERVICEPATH/etc/config.tcl -u service1 -g web &
# For AOLserver 4 using privileged ports (usually < 1024), add the flag
# -b youraddress:yourport
echo ""
}
stop()
{
echo -n "Stopping web server: $NAME"
killall aolserver4-nsd
echo ""
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 2
start
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|restart}"
exit 1
;;
esac
echo -n -e "\c\r\n"
exit 0
# End of script
# avoid pid not found errors in the log
mkdir /usr/lib/aolserver4/log
chown root:web /usr/lib/aolserver4/log
chmod 775 /usr/lib/aolserver4/log
# Set openacs to start on boot
update-rc.d openacs-service1 defaults
chmod u+x openacs-service1
ln -s /var/lib/aolserver/service1