V5.0.3 with Ubuntu Xenial Xerus (16.04)

image:ubuntu-xenial-xerus

This page explains how to install ]project-open[ V5.0 on Ubuntu Xenial Xerus LTS (16.04)  64bit.

Please Note:

 

Basic Installation

These instructions assume that you have installed Xenical Xerus amd64 server version.

Become "root"

sudo su -

  

Create the "projop" user
Note: 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 \
postgresql-9.5 postgresql-doc-9.5 postgresql-client-9.5 postgresql-client-common \
postgresql-contrib-9.5 ghostscript gsfonts imagemagick graphviz libcupsimage2 \
libreoffice-writer libreoffice-draw libreoffice-java-common

Verify PostgreSQL Installation

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

su - projop
psql --version
exit

You should see something like "psql (PostgreSQL) 9.5.9".


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/Support%20Files/naviserver-4.99.8.tgz
wget http://sourceforge.net/projects/project-open/files/project-open/V5.0/update/project-open-Update-5.0.3.0.0.tgz
wget http://sourceforge.net/projects/project-open/files/project-open/Support%20Files/web_projop-aux-files.5.0.0.0.0.tgz

cd /usr/local
tar xzf /usr/local/src/naviserver-4.99.8.tgz                        # extract the NaviServer binary for 64 bit

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

 

Review the ]po[ configuration file

Please review the configuration with your preferred editor:

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

You may want to modify::
  • set servername "<your_company_name_without_special_characters>"

 

Setup the PostgreSQL database 

Create the "projop" PostgreSQL user:

su - postgres
createuser -s projop
exit

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.5.0.3.0.0.sql > 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 
exit


Start ]project-open[ manually

/usr/local/ns/bin/nsd -f -t /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 0.0.0.0:8000".

Please check if there are much less than 40.000 lines and check for lines including "Error:" or "Warning:".

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.

 

 

Automate NaviServer Startup

Create a new file /lib/systemd/system/projop.service with the following content:  

[Unit]
Description=NaviServer Web Server as user projop
After=postgresql.service network.target
Wants=postgresql.service

[Service]
Type=forking
PIDFile=/web/projop/log/nsd.pid

ExecStartPre=rm -f /web/projop/log/nsd.pid
ExecStart=/usr/local/ns/bin/nsd -t /web/projop/etc/config.tcl -u projop -g projop
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s 9 $MAINPID

Restart=always
# Restart=on-abort
# Restart=on-abnormal

KillMode=process

[Install]
WantedBy=multi-user.target

Please execute the following commands in order to activate the configuration:

systemctl daemon-reload
systemctl enable projop.service
systemctl start projop.service
You can check that NaviServer is running by monitoring it's error file (debugging is switched on by default): 
tail -f /web/projop/log/error.log 

 

Additional Installation Steps

The following steps are necessary for production environments, but may not be necessary for a first evaluation:


Fix workflow 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 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:

user www-data;
worker_processes auto;
pid /run/nginx.pid;

events {
        worker_connections 768;
        # multi_accept on;
}


http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                '$status $body_bytes_sent "$http_referer" '
                '"$http_user_agent" "$http_x_forwarded_for"';
    access_log          /var/log/nginx/access.log  main;
    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   601;
    types_hash_max_size 2048;
    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;
    include             /etc/nginx/conf.d/*.conf;


    server {
        listen 80;
        location / {
            proxy_pass           http://127.0.0.1:8000;
            proxy_set_header     X-Forwarded-For $remote_addr;
            client_max_body_size 1024M;
        }
    }
}

Then please perform:

systemctl restart nginx.service
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:

#!/bin/bash
# openoffice.org headless server script
#
# chkconfig: 2345 80 30
# description: headless openoffice server script
# processname: openoffice
#
# Author: Vic Vijayakumar
# Modified by Federico Ch. Tomasczik
#
OOo_HOME=/usr/bin
SOFFICE_PATH=$OOo_HOME/soffice
PIDFILE=/var/run/openoffice-server.pid

set -e

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


FAQs, Documents and Issues Related to Xenial Xerus  

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)

Spain

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