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 Solutions Alliance

ERP/2.40/Environment Installation

Rating :
N/A
(0 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.

PostgreSQL documentation and tutorials are available from:


Microsoft Windows

Follow the instructions on the PostgreSQL wiki.


Debian (Ubuntu/Kubuntu/Linux Mint)

  1. Install the package using:
    sudo apt-get install postgresql-8.3
  2. Set the postgres password using:
    sudo su - postgres -c psql
    alter role postgres with password 'new_password';
    \q

Gentoo

  1. Install the package using the following commands. Portage will tell you which version to specify:
    echo dev-db/postgresql >> /etc/portage/package.keywords
    
    echo dev-db/libpq >> /etc/portage/package.keywords
    emerge -av postgresql
    emerge --config =postgresql-8.3.5
    /etc/init.d/postgresql start
    rc-update add postgresql default
  2. Set the postgres password:
    psql -U postgres
    
    alter role postgres with password 'new_password';
    \q
    sed -i 's/trust$/md5/' /var/lib/postgresql/8.3/data/pg_hba.conf
    /etc/init.d/postgresql reload

FreeBSD

  1. Install the package:
    cd /usr/ports/databases/postgresql83-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
  2. 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

  1. Install the package:
    yum install postgresql-server
  2. Create the initial database:
    /etc/init.d/postgresql initdb
    
    /etc/init.d/postgresql start
  3. 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

CentOS 5

  1. As root user, install the package:
     # yum install postgresql postgresql-server
  2. Create the initial database:
     # chkconfig postgresql on
    
    # service postgresql start
    The following output appears:
    Initializing database:                                     [  OK  ]
    Starting postgresql service:                               [  OK  ]
  3. Set the postgres password. There are three ways to set the password - as Root user, as a standard user using the psql shell, and using bash.
    • To set the password as Root user:
      #sed -i 's/ident sameuser$/trust/' /var/lib/pgsql/data/pg_hba.conf
      
      #service postgresql reload
      #service postgresql restart
      #psql -U postgres
    • To set the password in psql shell, as postgres user:
      postgres=# alter role postgres with password 'new_password';
      
      ALTER ROLE
      postgres=#\q
    • To set the password in bash, as Root user
       #sed -i 's/trust$/md5/' /var/lib/pgsql/data/pg_hba.conf
      
      #service postgresql reload
      #service postgresql restart

OpenSuse 10.2+

  1. Install the package:
    install via Yast
  2. Create the initial database:
    /etc/init.d/postgresql start
  3. Modify the /var/lib/pgsql/pg_hba.conf file by adding the following line to the end 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.
  4. Create a shortcut:
    ln -sf /usr/bin/pgsql /usr/bin/postgres
    When the installer asks for the Postgres binary enter /usr/bin


OpenSolaris 2008.05

  1. Install PostgreSQL 8.3 on OpenSolaris 2008.05 as follows:
    # pkg install SUNWpostgr-83-server SUNWpostgr-83-client SUNWpostgr-83-jdbc SUNWpostgr-83-server-data-root
  2. Import PostgreSQL Manifest file into SMF Framework
    # svccfg import /var/svc/manifest/application/database/postgresql.xml 
  3. Auto initdb the database and start the server
    # svcadm enable svc:/application/database/postgresql:version_83 
  4. To improve data loading speed during installation, you might want to edit /var/postgres/8.3/data/postgresql.conf and change following variables
     checkpoint_segments=16  
    If you have 1GB RAM or more, then also increase
     shared_buffers = 128MB 
     wal_buffers=512kB 
  5. Restart PostgreSQL as follows:
    # svcadm restart svc:/application/database/postgresql:version_83 

Oracle database

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

To learn more about Oracle, follow the links:

FreeBSD is not fully supported by Oracle. If you are using FreeBSD, the recommended database is PostgreSQL


Microsoft Windows

  1. Download Oracle 10g XE database.
  2. Add ORACLE_HOME and ORACLE_SID environment variables:
    1. Right-click on My Computer.
    2. Select Properties.The System Properties window appears.
    3. Select the Advanced tab.
    4. Click Environment Variables.
    5. Click New.
    6. In the Variable name field, type ORACLE_HOME.
    7. In the Variable value field, type the path of the Oracle XE installation directory. This is usually C:\oraclexe\app\oracle\product\10.2.0\server.
    8. Click OK. The ORACLE_HOME variable appears on the list.
    9. Click New.
    10. In the Variable name field, type ORACLE_SID
    11. In the Variable value field, type XE
    12. Click OK. The ORACLE_SID variable appears on the list.
    13. Select the 'PATH environment variable.
    14. Click Edit.
    15. In the Variable value field, add the path to the Oracle XE installation's bin folder. This is usually C:\oraclexe\app\oracle\product\10.2.0\server\bin
    16. Click OK.
  3. To verify that Oracle is running, launch a web browser and access http://127.0.0.1:8080/apex.

Debian (Ubuntu/Kubuntu/Linux Mint)

Follow these instructions to install Oracle 10g XE database on Debian (Ubuntu/Kubuntu).

Gentoo

Follow these instructions to install Oracle 10g XE database on Gentoo.

Fedora

  1. Download and install libaio to enable Asynchronous I/O:
    #yum install libaio
  2. As Root user, install the .rpm file
    # rpm -ihv oracle-xe-10.2.0.1-1.0.i386.rpm
  3. As Root user, run the configuration process:
    # /etc/init.d/oracle-xe configure
  4. Follow the on-screen prompts to configure the HTTP Listener, SQL*Net Listener, SYSTEM & SYS passwords.

The installation process does not configure the environment. To configure the environment add the following lines to the end of the .profile file:

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export ORACLE_SID=XE
export PATH=$PATH:$ORACLE_HOME/bin

OpenSuse 10.2+

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

Sun JDK

Openbravo supports the following JDKs:

Openbravo does not support OpenJDK, that comes preinstalled with Ubuntu 8.04 (Hardy Heron). Instead, install Sun JDK 1.5 (5.0) for Ubuntu.


Microsoft Windows

  1. Download and install JDK 1.5.
  2. Add the JAVA_HOME environment variable:
    1. Right-click on My Computer.
    2. Select Properties. The System Properties window appears.
    3. Select the Advanced tab then click Environment Variables.
    4. Click New. The New User Variable box appears.
    5. In the Variable name field, type JAVA_HOME.
    6. In the Variable value field type the path of the JDK installation directory. This is usually C:\Java\jdk1.5
    7. Select the PATH environment variable.
    8. In the Variable value field, type the path of the JDK installation directory's bin folder. This is usually C:\Java\jdk1.5\bin

Debian (Ubuntu/Kubuntu/Linux Mint)

You must add unstable/non-free apt repositories to install sun-java-jdk5. Ubuntu/Kubuntu users may also need to add the Multiverse repository to install sun-java-jdk5. The Multiverse repository is enabled by default in version Ubuntu 7.10 onwards. Refer to: https://help.ubuntu.com/ubuntu/desktopguide/C/programming.html.

  1. Install the package:
     sudo apt-get install sun-java5-jdk
  2. Set the Sun Java JDK as the default JDK:
    sudo update-java-alternatives -s java-1.5.0-sun
  3. Create the JAVA_HOME variable:
     echo 'JAVA_HOME="/usr/lib/jvm/java-1.5.0-sun"' | sudo tee -a 
    
    /etc/environment
  4. To make this variable available in your current terminal run:
    source /etc/environment
  5. To make these variables available system wide, restart the user session.

Gentoo

  1. To install the package:
     emerge -av sun-jdk
  2. Set the default JDK:
    java-config -S sun-jdk-1.5

Portage sets the JAVA_HOME variable automatically.

FreeBSD

  1. Install the package:
     cd /usr/ports/java/diablo-jdk15
    
    make clean install
  2. Download the package manually from the links provided by Ports. This is due to licensing issues.
  3. Copy the downloaded file into /usr/ports/distfiles.
  4. Launch the installation again:
    cd /usr/ports/java/diablo-jdk15
    
    make clean install
  5. Set the JAVA_HOME variable:
    echo 'JAVA_HOME=/usr/local/diablo-jdk1.5.0' >> /etc/profile

Fedora

  1. Download the latest Java 2 Platform Standard Edition. If you are installing the Sun JDK from a command line only system, you can use the following mirror:
    wget http://distfiles.gentoo.org/distfiles/jdk-1_5_0_13-dlj-linux-i586.bin
  2. In the /opt folder, execute the installer as Root:
    sh jdk-1_5_0_13-dlj-linux-i586.bin --unpack
  3. 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
  4. Source the file you just created:
     source /etc/profile.d/jdk.sh
  5. You can verify that the Java environment has been installed successfully installed by executing this command from the shell:
    java -version

OpenSuse 10.2+

Follow these instructions to install Sun JDK on OpenSuse.

OpenSolaris 2008.05

Install Sun JDK 6 as follows:

 # pkg install SUNWj6dev 


Apache Tomcat

Openbravo ERP requires Apache Tomcat version 5.5 as servlet container.


Microsoft Windows

  1. Download and install Apache Tomcat 5.5.
  2. Add CATALINA_HOME, CATALINA_BASE and CATALINA_OPTS environment variables:
    1. Right-click on My Computer.
    2. Select Properties. The system properties window appears.
    3. Select the Advanced tab.
    4. Click Environment Variables.
    5. Click New. The New User Variable box appears.
    6. In the Variable name field, type CATALINA_HOME.
    7. In the Variable value field, type the path of the Apache Tomcat installation directory. This is usually C:\Apache Software Foundation\Tomcat 5.5.
    8. Click OK.
    9. Click New. The New User Variable box appears.
    10. In the Variable name field, type CATALINA_BASE..
    11. In the Variable value field type the path of the Apache Tomcat installation directory.
    12. Click OK
    13. Click New. The New User Variable box appears.
    14. In the Variable name field, type CATALINA_OPTS.
    15. In the Variable value type -Xms384M -Xmx512M -XX:MaxPermSize=256M.
    16. Select the PATH environment variable.
    17. In the Variable value field, type the path of the Apache Tomcat installation's bin folder. This is usually C:\Apache Software Foundation\Tomcat 5.5\bin.


You can check that Tomcat is running by opening http://localhost:8080 in a web browser.

Debian (Ubuntu/Kubuntu/Linux Mint)

  1. 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, resulting in an error message. This will not affect the installation.
  2. Check that Tomcat is running by opening http://localhost:8180 in a web browser. Alternatively use the following nmap command to check that port 8180 is open:
     nmap localhost -p 8180
  3. 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
  4. To make this variable available in your current terminal run:
    source /etc/environment
  5. To make these variables available system wide, restart the user session.

Important notes:

  • There is a problem with JDK 1.5.0_13 and the jsvc binary used in the Apache Tomcat init script. Modify the script [/etc/init.d/tomcat5.5], by setting the LD_LIBRARY_PATH variable pointing to the path where the libawt.so shared library is located.
  • The security policy of Debian's Tomcat package will prevent the Openbravo context from loading. You must either disable the security policy or create a rule to allow the Openbravo context to load.
    1. To create a rule for Openbravo you must create a .policy file. Use a command like:
       sudo nano /etc/tomcat5.5/policy.d/20openbravo.policy
      to create a file called /etc/tomcat5.5/policy.d/20openbravo.policy.
    2. Open the file and add the following contents:
       // permissions for Openbravo ERP
      
      grant codeBase "file:${catalina.base}/webapps/openbravo/-" {
      permission java.security.AllPermission;
      };
    3. Save the file.
    4. Restart tomcat to make the changes effective.
       sudo /etc/init.d/tomcat5.5 restart

Gentoo

  1. Install the package:
    emerge -av tomcat
  2. Start Tomcat:
    /etc/init.d/tomcat-6 start
    rc-update add tomcat-6 default
    You can check that Tomcat has been in stalled correctly by opening http://localhost:8080 in a web browser Alternatively, use the following nmap command to check that port 8080 is open:
    nmap localhost -p 8080
  3. 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
  4. Update the environment and make the newly created environment variables available system-wide:
    env-update && source /etc/profile
  5. Set the CATALINA_OPTS variable by editing the /etc/conf.d/tomcat-6 file:
     CATALINA_OPTS="-server -Xms384M -Xmx512M -XX:MaxPermSize=256M"

FreeBSD

  1. 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
  2. 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
  3. Check that Tomcat is running by Opening http://localhost:8180 in a web browser.Alternatively, use the following nmap command to check that port 8180 is open:
    nmap localhost -p 8180

Fedora

  1. Install the package:
     yum install tomcat5
    
    /etc/init.d/tomcat5 start
  2. Check that Tomcat is running by opening http://localhost:8080 in a web browser. Alternatively use the following nmap command to check that port 8080 is open:
    nmap localhost -p 8080
  3. 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
  4. Log out and log in again to make the newly-created variables system-wide.

OpenSuse 10.2+

Please follow this guide to install Apache Tomcat on OpenSuse.

OpenSolaris 2008.05

Install Apache Tomcat as follows:

 # pkg install SUNWtcat 


Apache Ant

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


Microsoft Windows

  1. Download and extract Apache Ant into your system (for instance, C:\Apache-Ant).
  2. Add ANT_HOME environment variable:
    1. Right-click on My Computer.
    2. Select Properties. The System Properties window appears.
    3. Select the Advanced tab.
    4. Click on the Environment Variables button.
    5. Click the New button.
    6. In the Variable name field, type ANT_HOME.
    7. In the Variable value field, type the path of the Ant directory. This is usually C:\Apache-Ant.
    8. Click OK.
    9. Select the PATH environment variable.
    10. In the Variable value field, type the path of the Ant directory's bin folder. This is usually C:\Apache-Ant\bin.

Debian (Ubuntu/Kubuntu/Linux Mint)

  1. Install the package:
    sudo apt-get install ant ant-optional
  2. Set the ANT_HOME variable:
    echo 'ANT_HOME="/usr/share/ant"' | sudo tee -a /etc/environment
  3. Make the ANT_HOME variable available in your current terminal run:
    source /etc/environment
  4. To make the ANT_HOME variable available system wide, restart the user session.

Gentoo

In Gentoo it's enough to install the ant-core package:

emerge -av dev-java/ant-core

Portage sets the ANT_HOME variable automatically.

FreeBSD

  1. Install the package:
     cd /usr/ports/devel/apache-ant
    
    make clean install
  2. If you are installing Ant on 6.2 you must create a symbolic link to ant:
    ln -s /usr/local/bin/ant /usr/local/share/java/apache-ant/bin/ant
  3. Use setenv to ensure the ANT_HOME variable is set correctly:
     setenv ANT_HOME /usr/local/share/java/apache-ant

Fedora

  1. Install the package:
     yum install ant
  2. Set the ANT_HOME variable:
     sudo echo 'export ANT_HOME=/usr/share/ant' > /etc/profile.d/ant.sh
  3. Log out and log in again to make the variable system-wide.

OpenSuse 10.2+

  1. Install the package:
    Install via Yast
  2. Set the ANT_HOME variable:
     sudo echo 'export ANT_HOME=/usr/share/ant' > /etc/profile.d/ant.sh

Log out and log in again to make this variable system-wide.

OpenSolaris 2008.05

Install Apache Ant as follows:

 # pkg install SUNWant 


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. You could also find your problem at Openbravo ERP installation issues.

Ant jar

Found that if you have conflicting jar files within the Ant lib directory (/usr/share/ant/lib), running ant install.source will fail with ClassNotFound errors.

Solution for this, was to remove these from ant lib directory.

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.

Retrieved from "http://wiki.openbravo.com/wiki/ERP/2.40/Environment_Installation"

This page was last modified 09:35, 19 May 2009. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.


Category: Installation ERP