OpenSource ERP Software dedicated to small to mid-size companies

           Become Platinium or Gold Neogia Partner

Scratch deployment procedure

Contents

Introduction

I'm using Debian/Sarge Linux in VServer enviroment with original Java 1.4 from Sun (debianized version). Also, I'll use CVS HEAD revision of Neogia.

WARNING

This is only good for test and play enviroment. Many of these procedures could be useless in production enviroment, and even can destroy your data. You've been warned.

Preparation

Same as in Standard deployment procedure, without PostgreSQL. For Debian simply type:

apt-get install cvs ant ssh

To install java you need to use make-jpkg, after downloading Java.

Additional programs

Very nice program to colorize logs is ccze, another useful tool is lsof. To install them in Debian type:

apt-get install ccze losf

System profile

If you have directory /etc/profile.d then type:

PROFILE_UPDATE=/etc/profile.d/ofbiz.sh

else

PROFILE_UPDATE=/etc/profile

now:

cat >> $PROFILE_UPDATE
export JAVA_HOME=/path/where/jdk/is/installed
export PATH=$JAVA_HOME/bin:$PATH
export OFBIZ_HOME=/opt/ofbiz
^D

then:

. $PROFILE_UPDATE
unset PROFILE_UPDATE

Check out and installation

I'll use root user to simplify low port usage, but for deployment one shall use Apache connector and non root user. Derby database will be used.

cd /opt
cvs -d :pserver:anonymous@labs.libre-entreprise.org:/cvsroot/neogia login
cvs -d :pserver:anonymous@labs.libre-entreprise.org:/cvsroot/neogia co -A -d ofbiz ofbizNeogia
cd $OFBIZ_HOME

Right now I always have to tune up $OFBIZ_HOME/ant file, because Neogia needs very much memory to compile. Well edit it, and find line:

$JAVA -jar base/lib/ant-launcher.jar $*

modify it to look like:

$JAVA -Xmx2048M -jar base/lib/ant-launcher.jar $*

You are ready to build neogia with:

cd $OFBIZ_HOME
./ant clean-all
./ant build

Port changing and turning off SSL

For test enviroment it is very good to have low ports and SSL turned off - it's just easier to operate and follow links to other poeple involved with testing. To turn of SSL and use low ports edit files:

(cut) 
# HTTPS Port (Secure port)
port.https.enabled=N
port.https=443
force.https.host=

# HTTP Port (Not Secure port)
port.http=80
force.http.host=Y

(cut)

Change values from 8080 to 80, and from 8443 to 443 trough all files.

Change values from 8080 to 80 through all files.

Tweaks for running

Edit file startofbiz.sh: to preserve log between restart edit line

rm -f $OFBIZ_LOG

to

# rm -f $OFBIZ_LOG

In order to enable remote debugging, edit line:

#DEBUG="-Dsun.rmi.server.exceptionTrace=true"

to

DEBUG="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091"

Remember, that Eclipse have default remote port set to 8000, so change it to 8091.

If you have strange out of memory errors, edit line:

MEMIF="-Xms128M -Xmx128M"

to

MEMIF="-Xms128M -Xmx2048M" (if you've got 2GO for your RAM)

Setting default currency and localization

Edit file framework/common/config/general.properties. Set lines

currency.uom.id.default

to your currency code (eg. EUR,PLN), and

country.geo.id.default

to your 3 letter country code (eg. FRA,GER,POL).

Initializing your currencies

Some parts of Neogia use special currency checks. Some currencies aren't listed by default (eg. PLN). To do so you need to edit file framework/common/data/CurrencyData.xml and uncomment your currency (eg. PLN).

Installing seed data and running ofbiz

In $OFBIZ_HOME directory, run:

cd $OFBIZ_HOME
./ant run-install-seed

or if you want your data to be localized (Neogia specific), run:

./ant run-install-seed-fr

Then start Neogia

chmod a+x *.sh # just to be sure
./startofbiz.sh 

Connect to logs with:

reset ; tail -f $OFBIZ_HOME/framework/logs/console.log | ccze -A

If you do not have ccze:

reset ; tail -f $OFBIZ_HOME/framework/logs/console.log

Wait some time. There should appear lines like this:

50792 (main) [  CatalinaContainer.java:238:INFO ] Connector AJP/1.3 @ 8009 - not-secure [org.apache.jk.server.JkCoyoteHandler] started.
50792 (main) [  CatalinaContainer.java:235:INFO ] Connector HTTP/1.1 @ 80 - not-secure [org.apache.coyote.http11.Http11Protocol] started.
50792 (main) [  CatalinaContainer.java:235:INFO ] Connector TLS @ 443 - secure [org.apache.coyote.http11.Http11Protocol] started.

Log on another console and use lsof to check:

lsof -ni | egrep ^java\|^COMMAND
COMMAND     PID        USER   FD   TYPE   DEVICE SIZE NODE NAME
java      24834        root    3u  IPv4 55326148       TCP yo.ur.if.ip:8091 (LISTEN)
java      24834        root    4u  IPv4 55326161       TCP yo.ur.if.ip:10523 (LISTEN)
java      24834        root   10u  IPv4 55326242       TCP yo.ur.if.ip:rmiregistry (LISTEN)
java      24834        root   12u  IPv4 55326243       TCP yo.ur.if.ip:59686 (LISTEN)
java      24834        root  188u  IPv4 55326356       TCP yo.ur.if.ip:www (LISTEN)
java      24834        root  189u  IPv4 55326360       TCP yo.ur.if.ip:https (LISTEN)
java      24834        root  191u  IPv4 55326362       TCP yo.ur.if.ip:59693 (LISTEN)
java      24834        root  217u  IPv4 55326494       TCP yo.ur.if.ip:8009 (LISTEN)

Hurray! You have clean Neogia running!

Next

Now we have to:

* create internal company
* create some employees
* create facilites
* create clients
* create suppliers
* add some products and catalog
* do some tweaks

It is covered in Scratch deployment procedure - setting up basics

TODO

Provide clean patch file, which will automate generic changes without framework/common/config/general.properties file.