How To Install Openbravo ERP On Debian Lenny

Version 1.0
Author: Falko Timme
Last edited 02/10/2009

This document describes how to set up Openbravo ERP (enterprise management system) on Debian Lenny. Openbravo is an open source ERP solution designed specifically for the SME (small to midsize firm). Developed in a web based environment, it includes many robust functionalities which are considered part of the extended ERP: procurement and warehouse management, project and service management, production management, and financial management.

A list of Openbravo ERP features can be found on http://www.openbravo.com/product/product-features/.

I do not issue any guarantee that this will work for you!

 

1 Preliminary Note

In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.

 

2 Installing Openbravo Dependencies

2.1 PostgreSQL

Install PostgreSQL:

apt-get install postgresql-8.3

Afterwards we have to set the PostgreSQL admin password:

sed -i 's/ident sameuser$/trust/' /etc/postgresql/8.3/main/pg_hba.conf
/etc/init.d/postgresql-8.3 restart

Open a PostgreSQL shell...

psql -U postgres

... and set the password:

alter role postgres with password 'yourrootsqlpassword';
\q

(Replace yourrootsqlpassword with a password of your choice.)

sed -i 's/trust$/md5/' /etc/postgresql/8.3/main/pg_hba.conf
/etc/init.d/postgresql-8.3 reload

 

2.2 Java JDK

The Sun Java JDK is available in the Debian Lenny non-free repository, therefore we must open /etc/apt/sources.list...

vi /etc/apt/sources.list

... and add non-free to the Debian Lenny repositories:

deb http://ftp2.de.debian.org/debian/ lenny main non-free
deb-src http://ftp2.de.debian.org/debian/ lenny main non-free

deb http://security.debian.org/ lenny/updates main non-free
deb-src http://security.debian.org/ lenny/updates main non-free

Run

apt-get update

afterwards.

Install the Java JDK as follows:

apt-get install sun-java6-jdk

Afterwards make it available systemwide:

update-java-alternatives -s java-6-sun
echo 'JAVA_HOME="/usr/lib/jvm/java-6-sun"' | tee -a /etc/environment

After that log out and in again for the changes to take effect.

 

2.3 Apache Tomcat

Install Tomcat as follows:

apt-get install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps

Afterwards we have to configure it:

vi /etc/init.d/tomcat5.5

Change TOMCAT5_SECURITY from yes to no:

[...]
# Use the Java security manager? (yes/no)
#TOMCAT5_SECURITY=yes
TOMCAT5_SECURITY=no
[...]

Restart Tomcat:

/etc/init.d/tomcat5.5 restart

Now let's look if all went well:

netstat -tap | grep jsvc

Tomcat should be listening on port 8180:

server1:~# netstat -tap | grep jsvc
tcp6       0      0 [::]:8009               [::]:*                  LISTEN      6879/jsvc
tcp6       0      0 [::]:8180               [::]:*                  LISTEN      6879/jsvc
server1:~#

Next we need to set a few environment variables:

echo 'CATALINA_HOME="/usr/share/tomcat5.5"' | tee -a /etc/environment
echo 'CATALINA_BASE="/var/lib/tomcat5.5"' | tee -a /etc/environment
echo 'CATALINA_OPTS="-server -Xms384M -Xmx512M"' | tee -a /etc/environment

After that log out and in again for the changes to take effect.

 

2.4 Apache Ant

Apache ant has already been installed as dependency in the previous step - so all we have to do is set another environment variable:

echo 'ANT_HOME="/usr/share/ant"' | tee -a /etc/environment

After that log out and in again for the changes to take effect.

Share this page:

4 Comment(s)

Add comment

Comments

From: Raymond at: 2009-07-29 14:17:45

Instead of changing it in the start-up-script. Change it in /etc/default/tomcat5.5 P.S. great howto!

From: paper upgrade at: 2010-11-28 21:16:29

This link should help if you run into other issues: http://wiki.openbravo.com/wiki/ERP/2.50/Openbravo_environment_installation

From: paper upgrade at: 2010-11-28 11:27:02

Also, you should have at least 1.5GB RAM (probably 2 is better) and you'll need to change /etc/environment from: CATALINA_OPTS="-server -Xms384M -Xmx512M" TO CATALINA_OPTS="-server -Xms768M -Xmx1024M" THEN restart Tomcat OR ELSE YOU MAY GET THIS (ON MY 1GB Virtual Machine): BUILD FAILED /home/openbravo/OpenbravoERP-2.50MP23/build.xml:654: The following error occurred while executing this line: /home/openbravo/OpenbravoERP-2.50MP23/build.xml:1057: The following error occurred while executing this line: /home/openbravo/OpenbravoERP-2.50MP23/src/build.xml:128: org.openbravo.base.exception.OBException: java.lang.OutOfMemoryError: Java heap space

From: paper upgrade at: 2010-11-28 09:22:32

In MP23 (at least), you'll need to add uuid support to postgres if not already installed: http://www.f15ijp.com/2010/10/03/postgresql-8-3-adding-uuid-ossp-on-debian/ The .bin no longer exists(!?) but you can install from source as explained here: http://wiki.openbravo.com/wiki/ERP/2.50/Openbravo_ERP_Installation/Custom_Installation That reasonably worked well, but since you are NOT supposed to run ant as root (I tried to do everything as root and received errors), I did need to do the following:

  • 1. create a new user called openbravo,
  • 2. su into that account,
  • 3. download and extract the source pages to /home/openbravo
  • 4. adjust the postgresl password in ( /home/openbravo/OpenbravoERP-2.50MP23/config/Openbravo.properties) to match password from page 1 of this howto
  • 5. run ant (without placing sudo first), as explained in the link above