How to Install Openbravo ERP on an Ubuntu VPS

In this tutorial, we will show you how to install Openbravo ERP on an Ubuntu VPS . Openbravo ERP is an open source ERP (Enterprise Resource Planning) web-based business solution for small and medium sized companies released under the Openbravo Public License.

Please note, Openbravo is a resource hungry software, so in order to install Openbravo it is necessary to have at least 1.5 GB of RAM free on your server.

At the time of writing this tutorial, the latest stable version of Openbravo is 3.0PR14Q3.4 and it requires:

Update the server’s OS packages using the following commands:

apt-get update
apt-get upgrade

Install PostgreSQL:

sudo apt-get install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 uuid

Then, run the the following commands:

sudo -i -u postgres
update pg_database set datallowconn = TRUE where datname = 'template0';
\c template0
update pg_database set datistemplate = FALSE where datname = 'template1';
drop database template1;
create database template1 with template = template0 encoding = 'UTF8';
update pg_database set datistemplate = TRUE where datname = 'template1';
\c template1
update pg_database set datallowconn = FALSE where datname = 'template0';
ALTER ROLE postgres WITH PASSWORD 'your-password';
CREATE ROLE tad LOGIN PASSWORD 'your-tad-user-password';
template1=# \q

Restart the PostgreSQL service for the changes to take effect:

/etc/init.d/postgresql restart

Install Ant, OpenJDK and Tomcat 6:

sudo apt-get install ant openjdk-7-jdk tomcat6 tomcat6-admin tomcat6-user tomcat6-common

Run the following commands:

echo 'export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64' > /etc/profile.d/java.sh
echo 'export CATALINA_HOME=/usr/share/tomcat6' >> /etc/profile.d/java.sh
echo 'export CATALINA_BASE=/var/lib/tomcat6' >> /etc/profile.d/java.sh
echo 'export CATALINA_OPTS="-server -Djava.awt.headless=true -Xms512M -Xmx2048M -XX:MaxPermSize=512M"' >> /etc/profile.d/java.sh
chmod +x /etc/profile.d/java.sh
source /etc/profile.d/java.sh
cp $JAVA_HOME/lib/tools.jar /usr/share/tomcat6/lib/

Edit your Tomcat startup script and add the lines below immediately after ‘JVM_TMP=/tmp/tomcat6-$NAME-tmp’ line:

vi /etc/init.d/tomcat6

add the following lines:

CATALINA_OPTS="-server -Djava.awt.headless=true -Xms512M -Xmx2048M -XX:MaxPermSize=512M"

Edit /etc/tomcat6/tomcat-users.xml file:

vi /etc/tomcat6/tomcat-users.xml

add the following lines:

<role rolename="manager"/>
<role rolename="admin"/>
<user username="admin" password="your-tomcat-admin-password" roles="admin,manager"/>

Download the latest version of Openbravo ERP available at http://sourceforge.net/projects/openbravo/files/ to the server, extract it and run ‘ant setup’:

cd /opt/
wget http://sourceforge.net/projects/openbravo/files/02-openbravo-sources/3.0PR14Q3.4/openbravo-3.0PR14Q3.4.tar.bz2/download -O openbravo3.tar.bz2
tar -xjvf openbravo3.tar.bz2
cd /opt/Openbravo-3.0PR14Q3.4/
ant setup
cd config/
chmod 755 setup-properties-linux-x64.bin

Then, run the following command:


Follow the easy on-screen instructions and make sure you change these settings:

Admin Role Password [syspass]: <your-password>

DB Role Password [tad]: <your-tad-user-password>

Tomcat Manager URL:  http://<your_ip>:8080/manager

Tomcat manager password [admin]: <your-tomcat-admin-password>

Run ‘ant install.source’ as unprivileged user, for example create a new user named ‘openbravo’:

adduser openbravo
chown openbravo:openbravo -R /opt/openbravo/
chown openbravo:openbravo -R /opt/Openbravo-3.0PR14Q3.4/
cd /opt/Openbravo-3.0PR14Q3.4/
su openbravo
ant install.source
ant smartbuild

If you receive the following errors:

/opt/Openbravo-3.0PR14Q3.4/build.xml:487: The following error occurred while executing this line:
/opt/Openbravo-3.0PR14Q3.4/src/build.xml:843: The following error occurred while executing this line:
/opt/Openbravo-3.0PR14Q3.4/src/build.xml:849: Directory /var/lib/tomcat6/webapps/openbravo/WEB-INF/lib creation was not successful for an unknown reason

run the following commands to fix the problem:

su root
mkdir -p /var/lib/tomcat6/webapps/openbravo/
chown openbravo:openbravo /var/lib/tomcat6/webapps/openbravo/
su openbravo
ant smartbuild

Make sure tomcat6 user has read/write permissions to the ‘/var/lib/tomcat6/webapps/openbravo/’ directory:

chown tomcat6:tomcat6 -R /var/lib/tomcat6/webapps/openbravo/

Restart the Tomcat service:

/etc/init.d/tomcat6 restart

Open http://your_ip:8080/openbravo in your favorite web browser and log in into Openbravo using ‘Openbravo’ as username and  ‘openbravo’ as password. The system is case-sensitive so you need to type both username and password correctly to access Openbravo. Do not forget to change your Openbravo user password:



If you like to redirect to port 80 instead of 8080 and open Openbravo ERP using http://your-domain.com/openbravo , you need to edit the Apache configuration and set a reverse proxy. For example, edit the virtual host for your-domain.com in Apache and add these lines:

ProxyRequests Off

     <Proxy *>
         Order deny,allow
         Allow from all
         ProxyPass / http://your-domain.com:8080/
         ProxyPassReverse / http://your-domain.com:8080/
     <Location />
         Order allow,deny
          Allow from all

Restart your Apache web server for the changes to take effect and open Openbravo using http://your-domain.com/openbravo

That’s it. Openbravo has successfully been installed on your Ubuntu VPS.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to Openbravo ERP for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.


Categories: Tutorials

View Comments

Leave a Comment