Ubuntu Precise Pangolin (12.04)

This page explains how to install ]project-open[ V4.0 on Ubuntu Precise Pangolin LTS (12.04)  64bit.

Thanks to:

  • Malte Sussdorff from Cognovis  for providing the original version of these instructions for Ubuntu Lucid Lynx and making sure the fix for broken Ubuntu packages works on INTEL servers as well.
  • Iuri Sampaio from IURIX   for providing a fix for the broken Ubuntu AOLserver packages.

Please Note:


Basic Installation

Become "root" first

sudo su -


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...

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 libpq5 libwmf0.2-7 daemontools daemontools-run postgresql-8.4 \
postgresql-doc-8.4 postgresql-client-8.4 postgresql-client-common postgresql-contrib-8.4 ghostscript gsfonts \
psfontmgr imagemagick graphviz libcupsimage2 libreoffice-writer libreoffice-draw libreoffice-java-common

Please Note:

  • Installing the packages above there might be an error message
    Error: log: failed to re-open log file '/var/log/aolserver4/aolserver4.log': 'Permission denied

    You can ignore this messages, but please provide generous permissions to the folder using:
    chmod 777 /var/log/aolserver4
  • There may be a pink warning saying "Obsolete major version 8.4".
    Please ignore this screen by pressing "OK". The warning is not correct, because PostgreSQL 8.4 _is_ supported.

Verify PostgreSQL 8.4 Installation

]project-open[ requires PostgreSQL  8.4. ]po[ does not work with PostgreSQL 9.1. This is most frequent error when installing ]po[ on Ubuntu  or Debian .

Please check if there is PostgreSQL 9.x installed in your system:

dpkg -l | grep postgres

You should get the following lines (we have cut off the last column):

ii  aolserver4-nspostgres               4.5-3build1
ii  postgresql-8.4                      8.4.17-0ubuntu12.04
ii  postgresql-client-8.4               8.4.17-0ubuntu12.04
ii  postgresql-client-common            129ubuntu1
ii  postgresql-common                   129ubuntu1
ii  postgresql-contrib-8.4              8.4.17-0ubuntu12.04
ii  postgresql-doc-8.4                  8.4.17-0ubuntu12.04

]project-open[ will not work if there is a "9.0", "9.1" or a plain "postgresql" (without any version number) somewhere in these lines!

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.17 - contains support for command-line editing".

Fix a bug in the AOLserver distribution of Precise Pangolin (yes, an error in the distro!)

First we need to find out our exact distribution (and processor instruction set):  

cd /usr/local/src
uname -a

If you see something like "i386" or "i686" in the resulting line, use this instruction

wget http://mirror.linux.org.au/ubuntu/pool/universe/a/aolserver4-nssha1/aolserver4-nssha1_0.1-3_i386.deb
wget http://mirror.linux.org.au/ubuntu/pool/universe/a/aolserver4-nspostgres/aolserver4-nspostgres_4.5-3_i386.deb

dpkg -x aolserver4-nspostgres_4.5-3_i386.deb /
dpkg -x aolserver4-nssha1_0.1-3_i386.deb / 

In other cases, try this:

wget http://mirror.linux.org.au/ubuntu/pool/universe/a/aolserver4-nssha1/aolserver4-nssha1_0.1-3_amd64.deb
wget http://mirror.linux.org.au/ubuntu/pool/universe/a/aolserver4-nspostgres/aolserver4-nspostgres_4.5-3_amd64.deb

dpkg -x aolserver4-nspostgres_4.5-3_amd64.deb /
dpkg -x aolserver4-nssha1_0.1-3_amd64.deb /


Now it is time to configure the error log place

mkdir /usr/lib/aolserver4/log/
chgrp projop /usr/lib/aolserver4/log 
chmod g+w /usr/lib/aolserver4/log


Install additional AOLserver libraries that Ubuntu didn't include...

cd /usr/local/src
wget http://downloads.sourceforge.net/project/tcl/Thread%20Extension/2.6.7/thread2.6.7.tar.gz
tar -xzf thread2.6.7.tar.gz
cd thread2.6.7/unix
../configure --enable-threads --prefix=/usr/lib/aolserver4 --exec-prefix=/usr/lib/aolserver4 \
--with-aolserver=/usr/lib/aolserver4 --with-tcl=/usr/lib/tcl8.5
make install


Modify PostgreSQL parameters 

Please edit the PostgreSQL configuration file at /etc/postgresql/8.4/main/postgresql.conf with your preferred editor, search for the parameters below, remove the # before the parameters and set the values as specified. The values below are located towards the end of the postgresql.conf file in the "VERSION/PLATFORM COMPATIBILITY" section:

su - postgres
emacs /etc/postgresql/8.4/main/postgresql.conf

Set the values:
  • add_missing_from = on
  • default_with_oids = on
  • regex_flavor = extended


Now restart the the database:

/etc/init.d/postgresql restart


Get ]project-open[ product files

Please make sure you are "root" again:

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

su - projop
tar xzf /usr/local/src/project-open-Update-
tar xzf /usr/local/src/web_projop-aux-files.


Edit the ]po[ configuration file

Please modify the following parameters with your preferred editor:

su - projop
emacs /web/projop/etc/config.tcl

Now set the following parameters:
  • set servername "<your_company_name_without_special_characters>"
  • set homedir /usr/lib/aolserver4



Setup the PostgreSQL database 

Create the "projop" PostgreSQL user:

su - postgres
createuser -s projop

Create the PostgreSQL database and load the ]po[ "Tigerpond" demo data

su - projop
createdb --owner=projop --encoding=utf8 projop
createlang plpgsql projop                         (may generate an error that plpgsql is already installed.)
psql -f pg_dump. > import.log 2>&1   (this may take 5-300 seconds, depending on the speed of your server)
                                                  (servers with >20 seconds are only suitable for smaller companies)
                                                  (please see: http://www.project-open.org/en/benchmark-postgresql-load-database )

Start ]project-open[ manually

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

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

Please check for lines including "Error:" or "Warning:" if there are less lines of if the start-up is faster.

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.


Additional Installation Steps

The following steps are necessary in a production environment.

Fix workflow diagram rendering

The ]po[ dynamic workflow requires the package "graphviz" to be installed and the "dot" executable in the folder  /usr/local/bin/dot. However, Ubuntu by default installs the binary in /usr/bin/dot, so please create a symbolic link in the expected location

cd /usr/local/bin
ln -s /usr/bin/dot

Configure daemontools

Daemontools manage the startup of ]po[ and will restart ]po[ in case of a manual or unforeseen shutdown.

mkdir /var/lib/supervise/projop
echo '#!/bin/sh' > /var/lib/supervise/projop/run
echo 'exec /usr/lib/aolserver4/bin/nsd -it /web/projop/etc/config.tcl -u projop -g projop' >> /var/lib/supervise/projop/run
chown -R projop.projop /var/lib/supervise/projop
chmod ug+x /var/lib/supervise/projop/run
update-service --add /var/lib/supervise/projop/ projop
initctl start svscan

Now you should see your aolserver nicely starting up when typing in the following command (there may be a delay of 15 seconds before you can see the debugging lines coming):

tail -f /web/projop/log/error.log


Configure ngnix as Reverse Proxy (Optional)

]project-open[ by default listens on port 8000 and for permission reasons can not listen on port 80. As a workaround you can install a “reverse proxy” server on port 80 that redirects HTTP requests to port 8000.

You can configure Apache for such a purpose, or the small Web server ngnix. Ngnix is also convenient if you want to run more then one ]po[ or non-]po[ server on your machine, because it allows you to distribute HTTP requests to different back-ends, depending on the HTTP headers.

Assuming that there is no other process listening on port 80 (netstat -nlp | grep 80), please copy the following text into the file /etc/nginx/conf.d/default.conf:

server {
        listen 80;
        location / {
                proxy_pass        http://localhost:8000;
                proxy_set_header  X-Forwarded-For $remote_addr;

Then please perform:

/etc/init.d/nginx restart
netstat -nlp | grep 80

You should now see nginx listening on port 80.

Now you can point your web browser to the URL http://localhost/ or http://<your_ip>/ and see ]project-open[.

Prepare OpenOffice/LibreOffice (Optional)

This step is optional, because OpenOffice/LibreOffice is only needed for formatting specific documents. Also, you can configure OpenOffice later.

Please edit the file /etc/init.d/openoffice with your favorite editor and enter the following text:

# openoffice.org headless server script
# chkconfig: 2345 80 30
# description: headless openoffice server script
# processname: openoffice
# Author: Vic Vijayakumar
# Modified by Federico Ch. Tomasczik

set -e

case "$1" in
if [ -f $PIDFILE ]; then
echo "OpenOffice headless server has already started."
sleep 5
echo "Starting OpenOffice headless server"
$SOFFICE_PATH --headless --nologo --nofirststartwizard --accept="socket,host=,port=8100;urp" & > /dev/null 2>&1
touch $PIDFILE
if [ -f $PIDFILE ]; then
echo "Stopping OpenOffice headless server."
killall -9 soffice.bin
rm -f $PIDFILE
echo "Openoffice headless server is not running."
echo "Usage: $0 {start|stop}"
exit 1
exit 0

Then execute:

chmod 755 /etc/init.d/openoffice
update-rc.d openoffice defaults


Configure the Postfix Mail Server (Optional)

You can configure the Postfix SMTP server using the Ubuntu installer. This configuration is provided in case you haven't yet installed Postfix:

apt-get install postfix heirloom-mailx

The following "smarthost" configuration assumes that you have access to a SMTP server of your internet provider that requires a username/password. You could also just use your SMTP configuration from your personal email client.

sudo emacs /etc/postfix/main.cf

Search for relayhost and add the following lines beneath it

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth
smtp_sasl_security_options = noanonymous

Set the authentication username/password for your relayhost

sudo emacs /etc/postfix/smtp_auth

Now add your credentials to smtp_auth in clear text

yourrelayhost.com     yourusername:yourpassword

And add this to your postfix database

postmap /etc/postfix/smtp_auth
/etc/init.d/postfix reload
chmod 700 /etc/postfix/smtp_auth


Configure LDAP Integration (Optional)

You need this configuration only if you want to connect ]project-open[ to your department's Microsoft Active Directory or OpenLDAP server.

Install PERL module:

apt-get install perl ldap-utils
cpan                                 (please follow defaults)
-> install
-> install IO::Socket::PortState
-> install Net::LDAP                 (please follow defaults)

Install the auth-ldap-adldapsearch package:

Open ]project-open[ in your favorite Web browser and go to the URL http://localhost/intranet-sysconfig/ldap/ldap-ip-port and follow the steps.


Install TLS (Optional)

TLS is only necessary if you want to configure secure Web communication using HTTPS.

cd /usr/local/src/
wget http://downloads.sourceforge.net/tls/tls1.5.0-src.tar.gz
tar xzpf tls1.5.0-src.tar.gz
cd  tls1.5
apt-get install libssl-dev
./configure --with-ssl-dir=/usr --with-tcl=/usr/lib/tcl8.4 --enable-threads \
--enable-shared --prefix=/usr/lib/aolserver4 --exec-prefix=/usr/lib/aolserver4 \
make install

FAQs, Documents and Issues Related to Precise Pangolin 

Did you encounter any issues? Did you successfully install ]project-open[?

Please let us know for what purpose you want to use ]project-open[, and we provide you with half a day of free training or consulting if we publish a Success Story together.

  1. Search your ~projop/log/error.log file for ocurrences of the string “Error:” (upper case “E” and a colon as the last characters). Errors about “translation not found” are OK, but everything else is suspicious.
  2. Please check our FAQ section as a first step.
    Here you will find tips for diagnosing and debugging issues.
  3. Try searching for key words included in your issue here on www.project-open.org  using the search box on the top right of this page.
  4. Please visit our Open Discussions  forum at SourceForge and search for your issue. 
  5. Please check the Ubuntu Precise Pangolin thread  .
  6. If you still haven't found anything, please post into the thread .
  7. The ]project-open[ core team provides training, professional support and consulting services. Please contact us if you want to use ]po[ for more then a dozen of users.


  Contact Us
  Project Open Business Solutions S.L.

Calle Aprestadora 19, 12o-2a

08902 Hospitalet de Llobregat (Barcelona)


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