Openbravo environment installation
| Languages: |
English | Português | Translate this article... |
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:
- Microsoft Windows
- Debian Etch/Lenny/Sid
- Ubuntu/Kubuntu
- Linux Mint 4.0 Daryna
- Gentoo Linux 2007.0
- FreeBSD 6.2/6.3
- Fedora Core 7/8
- CentOS 4/5
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.
- PostgreSQL 8.2.x version has been a huge performance boost (compilation time will be around 3 times faster), therefore it is highly recommended over 8.1.x.
- PostgreSQL 8.3.x version will be fully supported by Openbravo ERP 2.40, it's faster than 8.2.x and therefore recommended.
Important notes:
|
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 su - postgres -c psql alter role postgres with password 'new_password'; \q
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:
- Oracle Database 10g Release 2 Documentation
- Oracle Database Express Edition Getting Started Guide
- Oracle Database 10g Express Edition Tutorial
- Oracle XE Database Administration on Debian
Microsoft Windows
Download and install Oracle 10g XE database.
Add ORACLE_HOME and ORACLE_SID environment variables:
- Right-click on My Computer then select Properties.
- In System properties pop-up window, click on Advanced tab then click on Environment Variables button.
- Click on New button and type:
- ORACLE_HOME as Variable name.
- Oracle XE installation directory in Variable value text field (usually C:\oraclexe\app\oracle\product\10.2.0\server).
- Click on New button and type:
- ORACLE_SID as Variable name.
- XE in Variable value text field for Express Edition.
- Edit PATH environment variable and add the path to bin folder inside your Oracle XE installation directory (usually C:\oraclexe\app\oracle\product\10.2.0\server\bin).
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.
Important notes:
|
Microsoft Windows
Download and install JDK 1.5.
Add JAVA_HOME environment variable:
- Right-click on My Computer then select Properties.
- In System properties pop-up window, click on Advanced tab then click on Environment Variables button.
- Click on New button and type:
- JAVA_HOME as Variable name.
- JDK installation directory in Variable value text field (usually C:\Java\jdk1.5).
- Edit PATH environment variable and add the path to bin folder inside your JDK installation directory (usually C:\Java\jdk1.5\bin).
Debian (Ubuntu/Kubuntu/Linux Mint)
- Debian users: You will need to add unstable/non-free apt repositories to install sun-java-jdk5.
- Ubuntu/Kubuntu users: You may need to add the Multiverse repository to install sun-java-jdk5. Version 7.10 onwards it is enabled by default. Please refer to: https://help.ubuntu.com/ubuntu/desktopguide/C/programming.html
- Linux Mint users: The Multiverse repository should have already been added by default. No need to add this repository.
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:
- Right-click on My Computer then select Properties.
- In System properties pop-up window, click on Advanced tab then click on Environment Variables button.
- Click on New button and type:
- CATALINA_HOME as Variable name.
- Apache Tomcat installation directory in Variable value text field (usually C:\Apache Software Foundation\Tomcat 5.5).
- Click on New button and type:
- CATALINA_BASE as Variable name.
- Apache Tomcat installation directory in Variable value text field (usually C:\Apache Software Foundation\Tomcat 5.5).
- Click on New button and type:
- CATALINA_OPTS as Variable name.
- -Xms384M -Xmx512M -XX:MaxPermSize=256M inside Variable value text field.
- Edit PATH environment variable and add the path to bin folder inside your Apache Tomcat installation directory (usually C:\Apache Software Foundation\Tomcat 5.5\bin).
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:
// permissions for Openbravo ERP
grant codeBase "file:${catalina.home}/webapps/openbravo/-" {
permission java.security.AllPermission;
};
sudo nano /etc/tomcat5.5/policy.d/20openbravo.policy
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:
- Right-click on My Computer then select Properties.
- In System properties pop-up window, click on Advanced tab then click on Environment Variables button.
- Click on New button and type:
- ANT_HOME as Variable name.
- Ant directory in Variable value text field (usually C:\Apache-Ant).
- Edit PATH environment variable and add the path to bin folder inside your Ant directory (usually C:\Apache-Ant\bin).
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:
Jasper Reports
- In some configurations to make the JasperReports work, you need to add to environment variable CATALINA_OPTS the parameter -Djava.awt.headless=true. The CATALINA_OPTS should look something similar to CATALINA_OPTS ="-server -Xms384M -Xmx512M -Djava.awt.headless=true".
Oracle
- Oracle XE 10g sets by default maximum number of processes to 20. This may cause Openbravo to throw an exception indicating that it has no connections available. To fix this set the value of this parameter to 150 by executing:
alter system set processes=150 scope=spfile;
in Oracle command line logged as sysdba and then restart the database.
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 ERP FAQ
Openbravo's ERP 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.
Category: Installation

