Log in / create account
View source | Discuss page | Page history | Printable version   
ADVERTISEMENT
Accounting eLearning Courses
Partnerships
SourceForge.net Logo
Openbravo ERP at SourceForge

SourceForge.net Logo
Openbravo POS at SourceForge

Open Solution Alliance Logo
Openbravo at Open Solution Alliance

Openbravo environment installation

Rating :
5.00/5
(5 votes cast)
You have to be registered to be able to vote

Contents

Introduction

This article explains in detail how to install and configure the whole stack required for Openbravo ERP to run, i.e.:

Important note: if you are looking for a quick way of evaluating and testing Openbravo ERP capabilities, you may consider browsing Openbravo ERP on-line demo or downloading Openbravo ERP virtual appliances.

Installation steps of each component are explained for the following operating systems:

Please feel free to contribute to this article by adding installation steps for more operating systems or improving existing ones.

PostgreSQL database

Openbravo ERP supports PostgreSQL as its database engine.

Current production version of Openbravo ERP (2.35 MP5) does not support PostgreSQL 8.3.

Please find some PostgreSQL documentation and tutorials at:

Microsoft Windows

Please follow this guide to install PostgreSQL database on Microsoft Windows.

Debian (Ubuntu/Kubuntu/Linux Mint)

To install the package:

sudo apt-get install postgresql-8.2

To set the postgres password:

sudo sed -i 's/ident sameuser$/trust/' /etc/postgresql/8.2/main/pg_hba.conf
sudo /etc/init.d/postgresql-8.2 restart
psql -U postgres
alter role postgres with password 'new_password';
\q
sudo sed -i 's/trust$/md5/' /etc/postgresql/8.2/main/pg_hba.conf
sudo /etc/init.d/postgresql-8.2 reload

Gentoo

To install the package:

echo dev-db/postgresql >> /etc/portage/package.keywords
echo dev-db/libpq >> /etc/portage/package.keywords
emerge -av postgresql
emerge --config =postgresql-8.2.7 #Portage will tell you which version to use
/etc/init.d/postgresql start
rc-update add postgresql default

To set the postgres password:

psql -U postgres
alter role postgres with password 'new_password';
\q
sed -i 's/trust$/md5/' /var/lib/postgresql/data/pg_hba.conf
/etc/init.d/postgresql reload

FreeBSD

To install the package:

cd /usr/ports/databases/postgresql82-server
make clean install
echo 'postgresql_enable="YES"' >> /etc/rc.conf
/usr/local/etc/rc.d/postgresql initdb
/usr/local/etc/rc.d/postgresql start

To create the postgres user:

psql -d postgres -U pgsql
create role postgres with password 'new_password';
alter role postgres login superuser createdb createrole;
\q

Fedora

To install the package:

yum install postgresql-server

To create the initial database:

/etc/init.d/postgresql initdb
/etc/init.d/postgresql start

To set the postgres password:

sudo sed -i 's/ident sameuser$/trust/' /var/lib/pgsql/data/pg_hba.conf
sudo /etc/init.d/postgresql reload
psql -U postgres
alter role postgres with password 'new_password';
\q
sudo sed -i 's/trust$/md5/' /var/lib/pgsql/data/pg_hba.conf
sudo /etc/init.d/postgresql reload

OpenSuse 10.2+

To install the package:

install via Yast

To create the initial database:

/etc/init.d/postgresql start

Make modifications to /var/lib/pgsql/pg_hba.conf by adding this to the bottom of the file :

host      all       all         xxxx   255.255.255.255  trust

Where xxxx is the ip address of the machine Postgres is running on.

Then create a shortcut as follows:

ln -sf /usr/bin/pgsql /usr/bin/postgres

(When the installer asks for the Postgres binary enter /usr/bin)

Oracle database

Openbravo ERP also supports Oracle 10g Express Edition (XE) as its database engine.

Please find some Oracle XE documentation and tutorials at:

Microsoft Windows

Download and install Oracle 10g XE database.

Add ORACLE_HOME and ORACLE_SID environment variables:

Check it's up and running by either opening http://127.0.0.1:8080/apex in a web browser.

Debian (Ubuntu/Kubuntu/Linux Mint)

Please follow this guide to install Oracle 10g XE database on Debian (Ubuntu/Kubuntu).

Gentoo

Please follow this guide to install Oracle 10g XE database on Gentoo.

FreeBSD

Fedora

OpenSuse 10.2+

Please follow this guide to install Oracle 10g XE database on OpenSuse.

Sun JDK

Sun Java Development Kit version 1.5 (also known as JDK 5.0) and 1.6 (also known as JDK 6.0) are supported by Openbravo ERP. This guide uses JDK 1.5.

Note that IBM's JDK should work fine too.

Microsoft Windows

Download and install JDK 1.5.

Add JAVA_HOME environment variable:

Debian (Ubuntu/Kubuntu/Linux Mint)

To install the package:

sudo apt-get install sun-java5-jdk

And to set it as the default JDK:

sudo update-java-alternatives -s java-1.5.0-sun

And we need to create the JAVA_HOME variable:

echo 'JAVA_HOME="/usr/lib/jvm/java-1.5.0-sun"' | sudo tee -a /etc/environment

Logout and login again to make this variable system-wide.

Gentoo

To install the package:

emerge -av sun-jdk

And to set it as the default JDK:

java-config -S sun-jdk-1.5

Portage sets the JAVA_HOME variable for you.

FreeBSD

To install the package:

cd /usr/ports/java/diablo-jdk15
make clean install

Due to license issues, Ports will tell you to download the package by hand. It will give you the links where to download the files. Afterwards, copy the file into /usr/ports/distfiles and launch the installation again:

cd /usr/ports/java/diablo-jdk15
make clean install

And to set the JAVA_HOME variable:

echo 'JAVA_HOME=/usr/local/diablo-jdk1.5.0' >> /etc/profile

Fedora

Download the latest Java 2 Platform Standard Edition. If you have problems downloading this due to Sun's UI that requires you to accept the license and gives you a cookie, use the following mirror:
 wget http://distfiles.gentoo.org/distfiles/jdk-1_5_0_13-dlj-linux-i586.bin

Position yourself in /opt folder and execute (as root) the downloaded installer using:

sh jdk-1_5_0_13-dlj-linux-i586.bin --unpack

To set the environment variables:

echo 'export JAVA_HOME=/opt/jdk1.5.0_13' > /etc/profile.d/jdk.sh
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> /etc/profile.d/jdk.sh

You have to source the file you just created by typing:

source /etc/profile.d/jdk.sh

Test if Java environment is successfully installed by typing in this in the shell:

java -version

OpenSuse 10.2+

Please follow this guide to install Sun JDK on OpenSuse.

Apache Tomcat

Openbravo ERP requires Apache Tomcat version 5.5 as servlet container.

Microsoft Windows

Download and install Apache Tomcat 5.5.

Add CATALINA_HOME, CATALINA_BASE and CATALINA_OPTS environment variables:

Check it's up and running by either opening http://localhost:8080 in a web browser.

Debian (Ubuntu/Kubuntu/Linux Mint)

To install the package:

sudo apt-get install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps
sudo rm /var/log/tomcat5.5/catalina.out
sudo /etc/init.d/tomcat5.5 start
Note: On Ubuntu the 'sudo rm /var/log/tomcat5.5/catalina.out' command may not find the file and give an error message,
but this is nothing to worry about.

Check it's up and running by either opening http://localhost:8180 in a web browser or with nmap:

nmap localhost -p 8180

The port should be opened. To set the CATALINA_HOME, CATALINA_BASE and CATALINA_OPTS variables:

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

Logout and login again to make this variable system-wide.

Important notes:
  • There is a problem with JDK 1.5.0_13 and the jsvc binary used in the Apache Tomcat daemon script. Modify it [/etc/init.d/tomcat5.5], by setting the LD_LIBRARY_PATH variable pointing to the path where the libawt.so shared library is located.
  • Next, due to the security policies of debian's tomcat package, it is necessary to either create a rule or disable it. Otherwise it will refuse to load the openbravo context. To create a rule for Openbravo, create a file /etc/tomcat5.5/policy.d/20openbravo.policy with the following contents:
// permissions for Openbravo ERP
grant codeBase "file:${catalina.home}/webapps/openbravo/-" {
  permission java.security.AllPermission;
};
  • Remember you need to be privileged to create this file so use a command like:
sudo nano /etc/tomcat5.5/policy.d/20openbravo.policy
  • Restart tomcat to make the changes effective.
sudo /etc/init.d/tomcat5.5 restart

Gentoo

To install the package:

emerge -av tomcat

Due to some license restrictions by Sun, you'll have to download some packages by hand and copy them to /usr/portage/distfiles. Portage will tell you when. Edit: All of the packages for Tomcat are now available in portage. To start it:

/etc/init.d/tomcat-6 start
rc-update add tomcat-6 default

Check it's up and running by either opening http://localhost:8080 in a web browser or with nmap:

nmap localhost -p 8080

The port should be opened. To set the CATALINA_HOME and CATALINA_BASE variables:

touch /etc/env.d/99tomcat
echo 'CATALINA_HOME=/usr/share/tomcat-6' >> /etc/env.d/99tomcat
echo 'CATALINA_BASE=/var/lib/tomcat-6' >> /etc/env.d/99tomcat

To update the environment and make this variables system-wide available:

env-update && source /etc/profile

Finally, set CATALINA_OPTS by editing the /etc/conf.d/tomcat-6 file:

CATALINA_OPTS="-server -Xms384M -Xmx512M -XX:MaxPermSize=256M"

FreeBSD

To install the package:

cd /usr/ports/www/tomcat55
make clean install
echo 'tomcat55_enable="YES"' >> /etc/rc.conf
/usr/local/etc/rc.d/tomcat5.5 start

To set the CATALINA_HOME, CATALINA_BASE and CATALINA_OPTS variables:

echo 'export CATALINA_HOME=/usr/local/tomcat5.5' >> /etc/profile
echo 'export CATALINA_BASE=/usr/local/tomcat5.5' >> /etc/profile
echo 'export CATALINA_OPTS="-server -Xms384M -Xmx512M -XX:MaxPermSize=256M"' >> /etc/profile

Check it's up and running by either opening http://localhost:8180 in a web browser or with nmap:

nmap localhost -p 8180

Fedora

To install the package:

yum install tomcat5
/etc/init.d/tomcat5 start

Check it's up and running by either opening http://localhost:8080 in a web browser or with nmap:

nmap localhost -p 8080

The port should be opened. To set the CATALINA_HOME, CATALINA_BASE and CATALINA_OPTS variables:

echo "export CATALINA_HOME=/usr/share/tomcat5" > /etc/profile.d/tomcat.sh
echo "export CATALINA_BASE=/var/lib/tomcat5" >> /etc/profile.d/tomcat.sh
echo "export CATALINA_OPTS=-server -Xms384M -Xmx512M -XX:MaxPermSize=256M" >> /etc/profile.d/environment

Logout and login again to make this variable system-wide.

OpenSuse 10.2+

Please follow this guide to install Apache Tomcat on OpenSuse.

Apache Ant

Apache Ant is a Java-based build tool used by Openbravo ERP to automate most of its development tasks.

Microsoft Windows

Download and extract Apache Ant into your system (for instance, C:\Apache-Ant).

Add ANT_HOME environment variable:

Debian (Ubuntu/Kubuntu/Linux Mint)

To install the package:

sudo apt-get install ant

To set the ANT_HOME variable:

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

Logout and login again to make this variable system-wide.

Gentoo

To install the package:

emerge -av dev-java/ant

It is necessary to make this link, otherwise the installer will fail:

ln -sf /usr/bin/ant /usr/share/ant-core/bin/ant

Portage sets the ANT_HOME variable for you.

FreeBSD

To install the package:

cd /usr/ports/devel/apache-ant
make clean install

With FreeBSD 6.2 you will need to create a symbolic link to ant:

ln -s /usr/local/bin/ant /usr/local/share/java/apache-ant/bin/ant

And use setenv to ensure the ANT_HOME variable is set correctly:

setenv ANT_HOME /usr/local/share/java/apache-ant

Fedora

To install the package:

yum install ant

To set the ANT_HOME variable:

sudo echo 'export ANT_HOME=/usr/share/ant' > /etc/profile.d/ant.sh

It is necessary to make this link, otherwise the installer will fail:

mkdir /usr/share/ant/bin
ln -sf /usr/bin/ant /usr/share/ant/bin/ant

Logout and login again to make this variable system-wide.

OpenSuse 10.2+

To install the package:

Install via Yast

To set the ANT_HOME variable:

sudo echo 'export ANT_HOME=/usr/share/ant' > /etc/profile.d/ant.sh

It is necessary to make this link, otherwise the installer will fail:

ln -sf /usr/bin/ant /usr/share/ant/bin/ant

Logout and login again to make this variable system-wide.

Performance and security tips

For production environments, it is recommended to make some changes in order to improve Openbravo ERP performance and security.

Known issues

Here is a list of known issues during Openbravo environment installation:

Tomcat hot-deployment problem on Windows

There is a known issue with Tomcat working under Windows. Openbravo ERP does a hot-deploy a of openbravo.war file to Tomcat but on Windows it often encounters file locking issues. Windows will not let Tomcat undeploy the old application because files are locked by the Operating System. Tomcat has mechanisms to allow avoiding locking. In Tomcat 5.5 and 6.0, this mechanism is disabled by default. To enable it edit %CATALINA_BASE%\conf\context.xml. Find the root <context> and add these two attributes:

<context antiJARLocking="true" antiResourceLocking="true" />

Openbravo FAQ

Openbravo's Frequently Asked Questions (FAQ).

Summary

It is very important to install and configure properly all the stack in order to avoid problems during Openbravo ERP installation.

Support

For any question or doubt regarding Openbravo environment installation, post them in Openbravo Help forum or join #openbravo IRC channel in Freenode.

Retrieved from "http://wiki.openbravo.com/wiki/Openbravo_environment_installation"

This page has been accessed 33,691 times. This page was last modified 14:12, 23 June 2008. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.


Category: Installation