Debian Wheezy (7.0)

This page explains how to install ]project-open[ V4.0 on Debian  Wheezy (7.0) . Please also see the discussion thread  on SourceForge.

 

Please Note:

  • There is an issue installing PostgreSQL 8.4 (exactly this version!) on Debian.
    Please let us know if you are a Debian wizard and know how to get around these issues.

 

Update:

User "goldfish_yo" has apparently found a solution to the PostgreSQL 8.4 issue above. However, we haven't yet validated the solution:

I just did a migration from a Debian Lenny to a new Debian Wheezy server.
Postgres 8.4 doesn't really work either. At least not for me, but my server
is still running an older version of PO, but this should still work.
The trick is to add the Postgres.org repos to debian, and then install the
older (still supported) version of postgres from there. (You'll need to do
this using su/root) add the following repo to /etc/apt/sources.list

deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main

Then run these commands to install postgres
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-8.2 postgresql-doc-8.2 postgresql-client-8.2 postgresql-client-common postgresql-contrib-8.2

Other than that, I pretty much just did everything here,
http://www.project-open.org/en/install-debian-wheezy
Changes from that tutorial
1) I did not update
/etc/init.d/postgresql
It was left as is.
2) Postgres configuration file is
/etc/postgresql/8.2/main/postgresql.conf
not
/usr/local/pgsql/data/postgresql.conf



Create the "projop" Linux user

Please don't change (at the moment) the name or the home directory (/web/projop/) of the new user. More than 20 different files reference the location, and the probability is very high that might miss one of them...

su - root
mkdir /web
mkdir /web/projop
groupadd projop
useradd -g projop -d /web/projop -m -s /bin/bash projop
chown -R projop:projop /web/projop/

Install required packages

Please install the packages below.

apt-get install git-core emacs unzip zip make wwwconfig-common nginx jodconverter ldap-utils tcl tcl8.4 tcllib \
tclthread tdom xotcl aolserver4-core aolserver4-daemon aolserver4-doc aolserver4-nspostgres aolserver4-nssha1 \
aolserver4-xotcl aolserver4-dev libdjvulibre-text libdjvulibre21 libgomp1 libilmbase6 liblcms1 libltdl7 \
libopenexr6 libpaper-utils libpaper1 libwmf0.2-7 daemontools daemontools-run  ghostscript gsfonts \
imagemagick graphviz libcupsimage2 libreoffice-writer libreoffice-draw libreoffice-java-common

 

Install PostgreSQL 8.4

]project-open[ does NOT run on PostgreSQL 9.x, and PostgreSQL 8.4 is NOT included in Debian Wheezy (at the moment of writing). So we need to compile PostgreSQL from source. Fortunately this isn't very difficult, compared with Wheezy library version incompatibilities:

# Get code and install required packages
apt-get install perl gcc debhelper cdbs libperl-dev libedit-dev gettext hardening-wrapper bison flex
cd /usr/src/
wget http://ftp.postgresql.org/pub/source/v8.4.17/postgresql-8.4.17.tar.bz2
tar xjf postgresql-8.4.17.tar.bz2

# Compile PostgreSQL
cd postgresql-8.4.17/
./configure
make
make install
cd contrib
make
make install
cd /usr/local/pgsql/bin/
cp * /usr/local/bin

# Initialize the database
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &

# Test the database
createuser -s projop
exit
su - projop
createdb --owner=projop --encoding=utf8 projop
psql -c "select version()"



Please copy the following text into /etc/init.d/postgresql:

#!/bin/sh

### BEGIN INIT INFO
# Provides:             postgresql
# Required-Start:       $local_fs $remote_fs $network $time
# Required-Stop:        $local_fs $remote_fs $network $time
# Should-Start:         $syslog
# Should-Stop:          $syslog
# Default-Start:        3 4 5
# Default-Stop:         0 1 6
# Short-Description:    PostgreSQL RDBMS server
### END INIT INFO

PGDATA=/usr/local/pgsql/data
PGLOG=/var/log/postgresql
case "$1" in
    start|stop|status|restart|reload)
        su -l postgres -c "/usr/local/pgsql/bin/pg_ctl -D $PGDATA $1" >> $PGLOG 2>&1 < /dev/null
        ;;
    *)
        echo "Usage: $0 {start|stop|restart|reload|status} [version ..]"
        exit 1
        ;;
esac
exit 0

Copy the PostgreSQL start-up script:

                   /usr/src/postgresql-8.4.17/contrib/start-scripts/linux to  
to

                   /etc/init.d/postgresql

and adjust settings if necessary. 

Edit PostgreSQL compatibility settings in /usr/local/pgsql/data/postgresql.conf. Look for VERSION/PLATFORM COMPATIBILITY section, and enable these variables as follows

add_missing_from = on
regex_flavor = extended
default_with_oids = on

Restart postgresql

/etc/init.d/postgresql restart

Please verify that you've got the right version of PostgreSQL installed:

su - projop
psql --version
You should see something like "psql (PostgreSQL) 8.4.x - contains support for command-line editing"

 

Install AOLserver and tDom

Install Aolserver4 and tdom

apt-get install aolserver4 aolserver4-dev aolserver4-doc aolserver4-nsopenssl aolserver4-nspostgres aolserver4-nssha1 aolserver4-nsxml tdom

 

Install ]project-open[

Please make sure you are "root" again:

cd /usr/src/
wget http://sourceforge.net/projects/project-open/files/project-open/V4.0/project-open-Update-4.0.4.0.0.tgz
wget http://sourceforge.net/projects/project-open/files/project-open/Support%20Files/web_projop-aux-files.4.0.4.0.0.tgz

su - projop
tar xzf /usr/src/project-open-Update-4.0.4.0.0.tgz
tar xzf /usr/src/web_projop-aux-files.4.0.4.0.0.tgz
mkdir /web/projop/log

 

Create a new database for ]po[ (default postgres charset is latin9, set it to utf8)

su - projop
createdb --owner=projop --encoding=UTF8 projop
createlang plpgsql projop

Load demo data into the database

cd /web/projop
psql -f pg_dump.4.0.4.0.0.sql > import.log 2>&1   (this may take 10-60 seconds)

Check the data has been correctly imported

psql

projop=# select count(*) from users;
count
-------
   196
(1 row)

projop=# \\q

Edit the ]po[ configuration file  /web/projop/etc/config.tcl parameters with your preferred editor and modify the following parameters:

# sleep 15     (disable the sleep line at the moment)
set servername "<your_company_name_without_special_characters>"
set homedir /usr/lib/aolserver4
 

Start ]project-open[ manually

/usr/lib/aolserver4/bin/nsd -ft /web/projop/etc/config.tcl -u projop -g projop

]po[ should take 15s to 60s to write out some ~40.000 lines before the line appears "[...] Notice: nssock: listening on 0.0.0.0:8000".

Please check that the start-up takes at least 10 seconds and produces these ~40.000 lines of debugging output. Otherwise there will be only a few hundred lines. In this case please watch out for lines including "Error:" or "Warning:".
In case you get an error "OpenACS could not allocate a handle from database pool pool1.", please see this page for additional instructions.

Now point your favorite Web browser to http://localhost:8000/ and login as "sysadmin@tigerpond.com" / "system". You should see the first page with the configuration wizard. Please do not continue here at the moment, because we still need to fix several issues before ]po[ will run as it should.

You can stop the ]po[ server in the terminal with Ctrl-C.


Exit user projop

exit

4. Init system

Edit default Aolserver4 init script /etc/init.d/aolserver4 and change next parameters

#USER=www-data
#GROUP=www-data
#ADDRESS=127.0.0.1
#CONF=/etc/aolserver4/aolserver4.tcl

USER=projop
GROUP=projop
ADDRESS=0.0.0.0
CONF=/web/projop/etc/config.tcl

Change next line (about line 42, remove -s main)

#-u $USER -g $GROUP -b $ADDRESS:$PORT -s main -t $CONF >/dev/null 2>&1
 -u $USER -g $GROUP -b $ADDRESS:$PORT -t $CONF >/dev/null 2>&1


5. Use Daemon tools to auto-start ]po[ 

Follow instructions provided at:
http://panoptic.com/wiki/aolserver/How_to_start_stop_AOLserver_using_Daemontools 

Test everything works

reboot

BE PATIENT, ]po[ can take up to 1 min to start after rebooting.

 

6. Config

Look into config file (/web/projop/etc/config.tcl) for tuning your server sitename, listening port, etc

 

7. Upgrade to ]project-open[ V3.4

Please go to http://www.sourceforge.net/projects/project-open/files/  -> V3.4 and download the latest ]po[ update (project-open-Update-3.4.x.y.z.tgz).

  • Rename the old /web/projop/packages folder into packages.3.2 or similar.
  • Extract the contents of the update installer into /web/projop/packages
  • Restart ]project-open[
  • Go to http://host:port/acs-admin/apm/ and select "Install packages" at the bottom of the page
  • Select all packages with status "update" and choose "Next ->"
  • After another restart please check the "Admin" page for additional upgrade instructions.

 

8. Enjoy!

Installation using ]po[ deb packages (Alpha)

IT Admins Group

 


This document describes how to install ]project-open[ 3.4.0.8 on a freshly installed Debian system

NOTE:

    * As seen in a comment below, do not use PostgreSQL 8.3 or 8.4 because it's still not working well with ]po[. And seeing as how 8.2 is not available in Debian you should use 8.1 for now.

1. Packages

Install system dependencies for ]po[:
apt-get install libreadline5-dev zlib1g-dev tcl8.4 tcl8.4-dev tk8.4-dev bison \
flex cdbs libpam0g-dev libperl-dev python2.4-dev python-dev x-dev

2. AOLserver

2.1 AOLserver on Debian

The original Debian packages for aolserver4 in Etch and Lenny are broken. Squeeze is the only version with a working aolserver4. If you are using Squeeze skip to step 4.  Otherwise start at step 1. The new aolserver4 packages (4.5.1) should make thier way into the main Debian repositories pretty soon.  
step 1: add the following to your /etc/apt/sources.list
deb http://mobigroup.ru/debian/ lenny main
deb-src http://mobigroup.ru/debian/ lenny main

step 2: update all packages

apt-get update

step 3:

apt-get install debian-mobigroup-keyring

step 4: Install Aolserver4, needed modules and tdom
apt-get install aolserver4 aolserver4-dev aolserver4-doc aolserver4-nscache \
aolserver4-nsopenssl aolserver4-nspostgres aolserver4-nssha1 aolserver4-nsxml tdom

2.2 AOLserver on Ubuntu

Karmic and Lucid both have a 4.5.1 version of aolserver4-core available. Just modify the above to fit your situation.

3. PostgreSQL

3.1 PostgreSQL on Debian

Until they get around to updating the DB for ]po[ it is necessary to use PostgreSQL 8.1 which means you will need to download the packages from the Debian Etch branch.

step 1: add the following to your /etc/apt/sources.list and comment out the Lenny/Squeeze source lines

deb http://ftp.de.debian.org/debian/ etch main contrib non-free
deb-src ftp://ftp.de.debian.org/debian/ etch main contrib non-free
step 2: apt-get update
step 3: apt-get install postgresql-8.1 postgresql-contrib-8.1
step 4: add the following to /etc/apt/preferences

                  Package: postgresql-common
                  Pin: version 71
                  Pin-Priority: 1001

                  Package: postgresql-client-common
                  Pin: version 71
                  Pin-Priority: 1001

                  Package: postgresql-8.1
                  Pin: version 8.1.17-0etch1
                  Pin-Priority: 1001

step 5: remove or comment out the Etch source lines in /etc/apt/sources.list and restore the Lenny/Squeeze lines. 

3.2 PostgreSQL on Ubuntu

Hardy has an 8.2 version of PostgreSQL available so just do the above steps with the hardy branch.

4. ]project-open[

Install ]po[ V3.4.0.8.

  1. add IT Admins repository to your /etc/apt/sources.list
    deb http://www.itadmins.net/packages/debian/ lenny/etch/squeeze main contrib non-free
  2. add the IT Admins Group key to apt.

    wget http://www.itadmins.net/packages/debian/itadmins_archive_keyring.gpg && cat itadmins_archive_keyring.gpg | apt-key add -
  3. Install
    apt-get update
    apt-get install project-open

IMPORTANT!!! you will be asked about replacing certain configuration files during the installation of ]po[.  YES!!! you want to replace the config files installed on your system with the ones that come with ]po[.

5. Init Page

Visit http://site.domain.tld:8000/  or https://site.domain.tld:8443/ and login with sysadmin@tigerpond.org (password: system)

6. Init System

There is an init script for ]po[ provided with the package. To control ]po[ simply:

/etc/init.d/projop start/restart/stop

7. Config

Look in config file (/web/projop/etc/config.tcl) for tuning your server sitename, listening port, etc


 


 

References

  Contact Us
  Project Open Business Solutions S.L.

Calle Aprestadora 19, 12o-2a

08902 Hospitalet de Llobregat (Barcelona)

Spain

 Tel Europe: +34 609 953 751
 Tel US: +1 415 200 2465
 Mail: info@project-open.com