Archive | January, 2013

OpenBravo Custom Installation steps on Windows:

11 Jan

Software Required:

  • Postgres or Oracle

Postgres Download path: http://www.postgresql.org/download/windows/

  • JDK

Download Path: http://www.oracle.com/technetwork/java/javase/downloads/index.html

  • Tomcat

Download Path: http://tomcat.apache.org/download-60.cgi

  • Ant

Download Path: http://ant.apache.org/bindownload.cgi

Pre requisites software installation

  1. Postgres Installation:

Contents

  • Introduction
  • Interactive installation
  • PostgresSql installation walkthrough
  • Stack builder installation walkthrough

Introduction

This document is based on the 8.4.x one-click installers.

Interactive installation

Most users will use the interactive mode for the installers. To launch the installation in interactive mode, you can normally double-click the file, or, you may choose to launch it from the command line, for example:

../software/postgresql-8.4.0-1-windows.exe

PostgresSql Installation walkthrough

The following screenshots show a typical installation on Windows installations follow the same procedure, as do text based installations, albeit without the graphical user interface.

1

The first page is an introduction. Click Next to continue.

Installation Directory

Select the directory in which you wish to store your data. You may also select an existing data directory which will be re-used, provided it is compatible with the server.

2

Password

3

Enter and confirm the password to be used for the superuser account (postgres) in the database cluster. On Windows, this password is also used for the service account and must match the current password if the account already exists. You can change the superuser password independently of the service account password at any time following the installation.

Port :5432

Select the port that the server will listen on. By default, incoming connections will only be accepted from the local machine. You can change this behaviour by editing the pg_hba.conf file in the data directory and reloading the server configuration. Note that this page will not be shown if you are reusing an existing data directory.

Advanced Options

Ready to Install

If you are happy with the options you selected, click Next to begin the installation process.

Installing

The installer will copy the program files to your computer, and them initialise the database cluster and configure the server.

Completing the PostgreSQL Setup Wizard

Now postgres 8.4 Installed successfully.

Java Installation:

  • Double-click on the saved jdk.exe file to start the installation process.
  • The installation process starts. Click the Install button to accept the license terms and to continue with the installation.  
  • Oracle has partnered with companies that offer various products. The installer may present you with option to install these programs when you install Java. After ensuring that the desired programs are selected, click the Next button to continue the installation.  
  • A few brief dialogs confirm the last steps of the installation process; click Close on the last dialog. This will complete Java installation process. 

6

NOTE: You may need to restart (close and re-open) your browser to enable the Java installation in your browser. 

STEPS:

  1. Install the required software’s and set environment variables for those.

Note : For Tomcat and ant download zip version and extract it, the extracted path is the installation path for Tomcat and ant.

Set Environment Variables:

    1. Right Click My Computer Properties
    1. Click Advanced Tab Select Environment Variables

In Environment variables click New button

Tomcat:

CATALINA_HOME : Your tomcat installation path (Eg: C:\Program Files\Apache Software Foundation\Tomcat 6.0)

CATALINA_BASE : Same as your CATALINA_HOME

CATALINA_OPTS : -server -Djava.awt.headless=true -Xms384M -Xmx1536M -XX:MaxPermSize=256M

CATALINE_HOME

CATALINA_BASE:

CATALINA_OPTS:

For Java:

Java_Home : Your installation path (Eg: C:\Program Files\Java\jdk1.6.0_14)

Path : %Java_Home%/bin;

JAVA_HOME

For Java_Home click New and add the variable:

Path:

Select path variable and click edit and Add the following “%JAVA_HOME%\bin;”

Ant:

ANT_HOME : your installation path (Eg: C:\apache-ant-1.8.4)

Path : %ANT_HOME%\bin

ANT_OPTS : 32 bits: In the Variable value field, type -Xmx1024M -XX:MaxPermSize=128M.

  1. its: In the Variable value field, type -Xmx1280M -XX:MaxPermSize=128M

ANT_HOME

Click New system variable and create ANT_HOME

Path:

Select path variable and click edit and Add the following “%ANT_HOME%\bin;”

ANT_OPTS:

Click New button and add ANT_OPTS

  1. You can download the tarball from source forge. The link is as follows

http://sourceforge.net/projects/openbravo/files/02-openbravo-sources/3.0MP13/Openbravo-3.0MP13.tar.bz2/download

  1. Extract the tarball and Move to the OpenbravoERP-3.0MP13 directory in a command line terminal and run:

ant setup

  1. Move to config folder and run setup-properties-windows.exe.
  2. Configure the openbravo.properties and log4j.icf files using the configuration wizard.

Follow the steps below,

  1. Click next button
  1. Select “I accept the agreement check box and click next button”
  1. Set your preferred date time options and click next button.
  1. Set the attachments directions and other parameters and click next to proceed further.
  1. Set development parameters as per our requirements, or else we can leave the default value and click next button to proceed further.
  1. Select the database of your choice and click “Next” button
  1. Set the credentials of the database administrator, so database will be created automatically during Step 6. Then click next.
  1. Set the url and credentials for tomcat manager, so that application will be deployed to tomcat automatically during step 6.
  1. This step is optional, so we can leave the default values and click “Next” button.

J) Click “Next” for installation to complete.

Note:

The configuration wizard prompts user to fill the database and tomcat credential, through which it creates database and deploys application in tomcat server.

Before starting with installation, check that Openbravo.properties and log4j.lcf files (in the config directory) have been properly configured. If not, edit them manually.

  1. In the command line type:

ant install.source

Note:

The above command creates database and all the required class files. This may take several minutes to complete.

  1. Once the installation is complete. Start your tomcat and To access Openbravo type

 http://ip-address/openbravo in your web browser. Use Openbravo as the username and openbravo as the password

Note:

In username “Openbravo” with an uppercase “O”.

OpenBravo Custom Installation steps on Ubuntu Server/Desktop:

11 Jan

–>  1.Create users

    1. openbravo [sudo adduser openbravo]
    2. postgres [sudo adduser postgres]
    3. tomatc6 [sudo adduser tomcat6]
  1. Give the role to all 3 as admin [sudo adduser openbravo admin, sudo adduser postgres admin, sudo adduser tomcat6 admin]
  2. Installing PostgreSQL on Debian (Ubuntu/Kubuntu/Linux Mint)
    1. Install the package using [sudo apt-get install postgresql-8.4 postgresql-contrib-8.4]
    2. Set the postgres password using:

[ sudo /etc/init.d/postgresql-8.4 start

sudo su – postgres -c psql

# alter role postgres with password ‘new_password’;

# \q]

  1. Installing the Java SDK on Debian (Ubuntu/Kubuntu/Linux Mint)
    1. Without X server
      1. Enable the Partner’s Repository:

[sudo add-apt-repository “deb http://archive.canonical.com/ubuntu YOUR_UBUNTU_VERSION_HERE partner”]

[sudo add-apt-repository “deb-src http://archive.canonical.com/ubuntu YOUR_UBUNTU_VERSION_HERE partner”]

[sudo apt-get update]

    1. You must add unstable/non-free apt repositories to install sun-java-jdk6. Ubuntu/Kubuntu users may also need to add the Multiverse repository to install sun-java6-jdk. The Multiverse repository is enabled by default in version Ubuntu 7.10 onwards.
    2. Install the package:

[ sudo apt-get install sun-java6-jdk]

    1. Set the Sun Java JDK as the default JDK:

[sudo update-java-alternatives -s java-6-sun]

    1. Create the JAVA_HOME variable:

[ echo ‘JAVA_HOME=”/usr/lib/jvm/java-6-sun”‘ | sudo tee -a /etc/environment]

    1. To make this variable available in your current terminal run:
      1. source /etc/environment
  1. Installing Apache Tomcat on Debian (Ubuntu/Kubuntu/Linux Mint)
    1. Install the package:

[ sudo apt-get install tomcat6 tomcat6-admin ]

[sudo rm /var/log/tomcat6/catalina.out ]

[sudo /etc/init.d/tomcat6 start ]

    1. Note: On Ubuntu the ‘sudo rm /var/log/tomcat6/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:8080 in a web browser. Alternatively use the following nmap command to check that port 8080 is open:

[nmap localhost -p 8080]

    1. if you don’t have installed nmap you can try

[sudo netstat -atunep|grep 8080|grep jsvc]

    1. Note: Earlier versions of Debian based distributions configured Tomcat to run on port 8180. If you cannot verify that Tomcat is running on port 8080, please try 8180 instead.
    2. Set the CATALINA_HOME, CATALINA_BASE and CATALINA_OPTS variables:

[echo ‘CATALINA_HOME=”/usr/share/tomcat6″‘ | sudo tee -a /etc/environment]

[echo ‘CATALINA_BASE=”/var/lib/tomcat6″‘ | sudo tee -a /etc/environment ]

    1. Edit the /etc/default/tomcat6 file, and set the following line:-

[JAVA_OPTS=”-server -Djava.awt.headless=true –Xms720M –Xmx1024M -XX:MaxPermSize=512M”]

    1. To make this variable available in your current terminal run:
    2. source /etc/environment
    3. To make these variables available system wide, restart the user session.
    4. Check if the tools.jar library is present in Tomcat’s classpath in directory /usr/share/tomcat6/lib and, if not, add it:

[cp $JAVA_HOME/lib/tools.jar /usr/share/tomcat6/lib/]

    1. In order to avoid Tomcat from auto-reloading itself, comment the WatchedResource line in /var/lib/tomcat6/conf/context.xml:

<!– <WatchedResource>WEB-INF/web.xml</WatchedResource> –>

    1. Configure a username and password for the Tomcat Manager, by replacing the /etc/tomcat6/tomcat-users.xml file with these contents, replacing password=”admin” with your chosen password:

<?xml version=’1.0′ encoding=’utf-8′?>

<tomcat-users>

<role rolename=”manager”/>

<role rolename=”admin”/>

<user username=”admin” password=”admin” roles=”admin,manager”/>

</tomcat-users>

    1. Starting with 2.50, the modularity feature required the tomcat user to write in the main Openbravo ERP directory. So achieve this, edit the /etc/init.d/tomcat6 file, search for umask 022 and replace it with umask 002. Then restart Tomcat.
  1. Installing Apache Ant on Debian (Ubuntu/Kubuntu/Linux Mint)
    1. Install the package:

[sudo apt-get install ant ant-optional]

    1. Set the ANT_HOME variable:

[echo ‘ANT_HOME=”/usr/share/ant”‘ | sudo tee -a /etc/environment]

    1. Set the ANT_OPTS variable:

[echo ‘ANT_OPTS=”-Xmx1024M -XX:MaxPermSize=128M”‘ | sudo tee -a /etc/environment]

    1. Make the ANT_HOME and ANT_OPTS variables available in your current terminal run:
      1. source /etc/environment
    2. To make the variables available system wide, restart the user session.
  1. Install the Openbravo source
    1. Copy the source file at /opt
    2. Change the owner as openbravo user

[chown /opt/openrbavo openbravo:openbravo –R]

[chmod 771 /opt/openrbavo –R]

    1. Build the openbravo at /opt/openbravo
    2. [ant install.source]
    3. [ant smartbuild]

[chown /var/lib/tomcat6/openrbavo tomcat6:tomcat6 –R]

[chmod 771 /var/lib/tomcat6/–R]

Enjoy it 😉