in this section, I will share how to install Openbravo ERP. we will install Openbravo ERP from source, using ubuntu Linux. installing Openbravo ERP from source have some significant advantages. one of the most motivating issue is installing from source enable us to develop specific customization, which is not achivable, for instance, if we install using appliance of ubuntu repository.we need to follow steps below to install Openbravo ERP:
- install jdk
- install postgresql
- install ant
- install tomcat
- compile openbravo
1. install JDK
in this openbravo ERP installation how to, we will use openjdk-8. according to http://ubuntuhandbook.org/index.php/2015/01/install-openjdk-8-ubuntu-14-04-12-04-lts/ you need to add repository below:
sudo add-apt-repository ppa:openjdk-r/ppa
update apt
sudo apt-get update
install openjdk-8
sudo apt-get install openjdk-8-jdk
set default jdk
sudo update-alternatives --config java
it will show options like below
From openbravo tutorial |
select openjdk-8 as default
check java version to validate your installation
java -version
it outputs something like this:
openjdk version "1.8.0_45-internal" OpenJDK Runtime Environment (build 1.8.0_45-internal-b14) OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)
2. install postgresql
openbravo can use either postgresql or oracle as its RDBMS. we will use postgresql. install postgresql using apt:
sudo apt-get install postgresql postgresql-contrib
edit pg_hba.conf to enable access postgresql from localhost without password
sudo nano /etc/postgresql/9.3/main/pg_hba.conf
you may use another path, depend on your postgresql version.
find row like below:
host all all 127.0.0.1/32 md5
and change to this:
host all all 127.0.0.1/32 trust
save and exit (CTRL+o, then CTRL+x). restart postgresql
sudo service postgresql restart
login to postgresql
psql -U postgres -h localhost
change password of postgres
alter user postgres with password '<your password>';
change <your password> with your desired password.
quit from postgresql
\q
edit pg_hba.conf to secure access postgresql from localhost with password
sudo nano /etc/postgresql/9.3/main/pg_hba.conf
find row like below:
host all all 127.0.0.1/32 trust
and change to this:
host all all 127.0.0.1/32 md5
save and exit (CTRL+o, then CTRL+x). restart postgresql
sudo service postgresql restart
login to postgresql
psql -U postgres -h localhost
now enter your password that you just set before
if you can login, then you did, now postgresql secured.
quit from postgresql
\q
3. install ant
install ant using apt:
sudo apt-get install ant ant-optional
check ant version to validate your installation
ant -version
it output something like below:
Apache Ant(TM) version 1.9.3 compiled on April 8 2014
4. install tomcat
you can install tomcat 7 for latest Openbravo ERP version. for now we will install apache tomcat 6. download binary distribution of apache tomcat 6 here.
extract to your directory, make sure you have enough permission. for simplicity, we will install tomcat 6 in home folder. extract tomcat binary distribution to /home/<your user name>/tomcat
you may change <your user name> to your actual ubuntu user name
go to your tomcat forder using command line tool:
cd /home/<your user name>/tomcat
change permission to *.sh into executable files:
chmod +x -r *.sh
edit file catalina.sh inside bin folder
at the top, add lines below:
ANT_HOME="/usr/share/ant" ANT_OPTS="-Xmx512m -XX:MaxPermSize=512m" JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-amd64" JAVA_OPTS="-Djava.awt.headless=true -Xms40m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m" CATALINA_BASE="/home/<your user name>/tomcat" CATALINA_HOME="/home/your user name/tomcat" CATALINA_OPTS="-Djava.awt.headless=true -Xms40m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m"
once again, change <your user name> into your actual ubuntu user name
now edit <your tomcat folder>/conf/tomcat-users.xml
find something like:
<!-- <role rolename="tomcat"/> <role rolename="role1"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1" password="tomcat" roles="role1"/> -->
change it into:
<role rolename="manager-gui"/> <user username="<your tomcat username>" password="<your tomcat password>" roles="manager-gui"/>
change <your tomcat username> into your desired tomcat manager username
change <yoru tomcat password> into your desired tomcat manager password
go to your home folder
cd ~
edit your profile
nano .profile
at the bottom, add lines below:
ANT_HOME="/usr/share/ant" ANT_OPTS="-Xmx512m -XX:MaxPermSize=512m" JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-amd64" JAVA_OPTS="-Djava.awt.headless=true -Xms40m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m" CATALINA_BASE="<your tomcat folder>" CATALINA_HOME="<your tomcat folder>" CATALINA_OPTS="-Djava.awt.headless=true -Xms40m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m" export ANT_HOME ANT_OPTS JAVA_HOME JAVA_OPTS CATALINA_HOME CATALINA_BASE CATALINA_OPTS
save and exit.
apply your new profile
source .profile
test your new profile
echo $CATALINA_HOME
it show your tomcat folder.
go to bin folder on your tomcat folder
cd <your tomcat folder>/bin
start tomcat
sh startup.sh
it will output something like below:
Using CATALINA_BASE: <your tomcat folder> Using CATALINA_HOME: <your tomcat folder> Using CATALINA_TMPDIR: <your tomcat folder>/temp Using JRE_HOME: /usr/lib/jvm/java-1.8.0-openjdk-amd64 Using CLASSPATH: /home/wirabumi/tomcat/bin/bootstrap.jar
using browser, go to localhost:8080, you will find tomcat index page, its mean your tomcat installed successfully.
5. setup Openbravo.properties
you can download openbravo souce here, then extract to your desired installation folder. remember, you need enough permission in this folder. I will use my home directory for simplicity. we call this folder as <openbravo source folder> now and after. once extracting done, using command line tool, go to your <openbravo source folder>, type:
ant setup
this command will guide you during setup. press enter when it ask you, until you find this question:
Do you accept this license? [y/n]:
select Y. next question:
Please select date format: [0] DDMMYYYY [1] MMDDYYYY [2] YYYYMMDD Please, choose an option [0]:
I will selet 0 since it is my date format in my country, you may select another option.
next question:
Please select date separator: [0] - [1] / [2] . [3] : Please, choose an option [0]:
I will select 0 since it is my date format in my country, you may select another option.
next question:
Please select time format: [0] 12h [1] 24h Please, choose an option [1]:
I will select 1 since it is my time format in my country, you may select another option.
Please select time separator: [0] : [1] . Please, choose an option [0]:
I will select 1 since it is my time format in my country, you may select another option.
next question:
Please introduce Attachments directory: Please, introduce here: [/opt/openbravo/attachments]:
I will set /home/<your username>/openbravo/attachment
change <your username> into your actual ubuntu username. remember, my installation located at home folder. you may select another path.
next question:
Please introduce Context name: Please, introduce here: [openbravo]:
I will let it default
for the next question I will let it default, until this question:
Please select Database: [0] Oracle [1] PostgreSQL Please, choose an option [1]:
I will select 1 since we will use postgresql as its database.
next question:
Please introduce SID: Please, introduce here: [openbravo]:
let it default
next question:
Please introduce System User: Please, introduce here: [postgres]:
let it default since our postgresql username is postgres
next question:
Please introduce System Password: Please, introduce here: [syspass]:
set password of postgresql that you set in the previous step.
next question:
Please introduce DB User: Please, introduce here: [tad]:
let it default
Please introduce DB User Password: Please, introduce here: [tad]:
let it default
Please introduce DB Server Address: Please, introduce here: [localhost]:
let it default
Please introduce DB Server Port: Please, introduce here: [5432]:
let it default
---------------------------------------------------------------------------- Do you agree with all options that you have configured? ---------------------------------------------------------------------------- [1] Accept. [2] Back to preview configuration. [3] Exit without saving. Choose an option:
select 1.
now you have done with installation openbravo configuration. you can see configuration file in config/Openbravo.properties.
now, compile openbravo:
ant install.source
wait until complete, the last compile log look like below:
database.postupdate.POSTGRE: [sql] Executing commands [sql] 5 of 5 SQL statements executed successfully [sql] Executing commands [sql] 2 of 2 SQL statements executed successfully setApplied: [sql] Executing commands [sql] 2 of 2 SQL statements executed successfully BUILD SUCCESSFUL Total time: 11 minutes 43 seconds
if you want to see complete log as reference you can open this page (password: infystra). now, restart your tomcat. go to <tomcat folder>/bin then
sh shutdown.sh
and start again
sh startup.sh
wait until tomcat ready, then using browser, go to localhost:8080/openbravo
From openbravo tutorial |
now openbravo ERP installes successfully. next, you may want to setup eclipse IDE for openbravo, or setup mercurial clone (repository) for openbravo.
One thought on “install openbravo ERP”