Compiere 2.4.4a on Debian GNU/Linux 3.0 'woody' (with Oracle 9i 9.2.0.1.0)


Compiere on Debian GNU/Linux


the monster of opensource ERP & CRM systems
on the monster of free GNU/Linux operating systems
with the monster of commercial object relational databases



















Doc v 0.2a - Updated 22032003




0. INDEX
I. Advertisement
II. Debian GNU/Linux Environment Setup
III. Oracle Installation
IV. Java 1.4.1 Installation
V. Compiere Server Install
VI. Compiere Client Install
VII. Final Environment Setup
VIII. Forward Steps
IX. References



I. ADVERTISEMENT

Such kind of document is for consideration on a development/prototype environment. Don't try this steps on any production environment.

Requirements:
- Debian GNU/Linux 3.0 woody system running up on a Celeron or superior Intel processor.
(Oracle installation requires glibc 2.2 so at least you should have Woody on a chroot environment).
- At least 512MB of RAM memory.
- Dedicated partition with minimum of 5GB (in this case /ora 20GB partition with ext3 journaling).
- Remember to compile kernel for your machine optimization.



II. DEBIAN GNU/LINUX ENVIRONMENT SETUP

Steps to perform as root for setting up Oracle installation environment:

a. Create oracle group, user and home directory.
addgroup dba
adduser --uid 101 --home /ora --no-create-home --ingroup dba oracle
chown oracle.dba /ora
mkdir /ora/9iR2
chown oracle.dba /ora/9iR2


b. Create links needed by Oracle installer.
ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/sort /bin/sort
ln -s /usr/bin/basename /bin/basename


c. Install mandatory packages.
apt-get install make binutils gcc libstdc++2.10-glibc2.2 libstdc++2.10-dev libstdc++2.9-glibc2.1

If exim isn't in your Woody installation (dpkg -l | grep exim ) you should install some decent smtp server
apt-get install postfix

Now check versions of development environment
perl -v
This is perl, v5.6.1 built for i386-linux

gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)

ld -V
GNU ld version 2.12.90.0.1 20020307 Debian/GNU Linux
Supported emulations:
elf_i386
i386linux

uname -a
Linux puigsuris 2.4.20-686 #1 SMP Fri Jan 10 14:39:43 CET 2003 i686 unknown


d. Reconfigure Locales with en_US and unicoded en_US, then use LC_TYPE for root user.
dpkg-reconfigure locales

then select
en_US ISO-8859-1
en_US.UTF-8 UTF-8


unset LANG
unset LC_ALL
export LC_TYPE=en_US


e. Create 1GB swap file if needed.
dd if=/dev/zero of=/ora/tmpswap bs=1k count=1024000
chmod 600 /ora/tmpswap
mkswap /ora/tmpswap
swapon -v /ora/tmpswap


remember to disable and delete upon installation of Oracle.
swapoff /ora/tmpswap
rm /ora/tmpswap

f. Check and Setup Kernel Semaphore parameters.

sysctl kernel.sem
(alternative method cat /proc/sys/kernel/sem ).
kernel.sem = 25032000 32 128
Values SEMMSL SEMMNS SEMOPM SEMMNI

As Oracle release notes SEMOPM should be 100 at least, so setupit.
sysctl -w kernel.sem="250 32000 100 128"

and put permanently at boot time.
echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf


sysctl kernel.shmall
kernel.shmall = 2097152

leave as default

sysctl kernel.shmmax
Again as release notes should be at least one half of RAM, so setupit.
sysctl -w kernel.shmmax=`expr \( 512 \/ 2 \) \* 1024 \* 1024`

and put at boot time
echo "kernel.shmmax=`expr \( 512 \/ 2 \) \* 1024 \* 1024`" >>/etc/sysctl.conf

sysctl kernel.shmmni
4096

at least 100

echo 65536 > /proc/sys/fs/file-max

ulimit -n 65536


ulimit -u 16384


ulimit -f
unlimited




III. ORACLE INSTALLATION

Steps to perform as oracle user to start Oracle Universal Installer.

xauth list | grep localdom
(to get MIT-MAGIC-COOKIE of X window's current user)
su - oracle (or directly sux - oracle, or with ssh -X -l oracle)
export DISPLAY=:0.0
xauth add $DISPLAY MIT-MAGIC-COOKIE-1
PASTE MAGIC-COOKIE STRING

cd /ora


Decompress downloaded installation system
gunzip *.gz
cpio -idmv < lnx_920_disk1.cpio; cpio -idmv < lnx_920_disk2.cpio; cpio -idmv < lnx_920_disk3.cpio
Alternatively you shoud mount your Oracle cd.

Setup environment variables
export ORACLE_BASE=/ora
export ORACLE_HOME=$ORACLE_BASE/9iR2
export ORACLE_TERM=xterm
export ORACLE_SID=compiere
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export PATH=$PATH:$ORACLE_HOME/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export LC_LANG=en_US
export LC_ALL=en_US
unset LANG


If your /tmp dir doesn't have 500MB you shoud create one mkdir /ora/tmp and export variables
export TEMP=/ora/tmp
export TMPDIR=/ora/tmp


Cross your fingers, read random fortune quote, read random king james bible's verse and type:
./Disk1/runInstaller

First installation screens shoud appear. Then asks for oraInventory destination
Unix Group Name dba
Open a root shell window and perform script /tmp/orainstRoot.sh
File locations and $ORACLE_HOME destination
Product to install Oracle9i Database 9.2.0.1.0
Installation of Custom type
Product Components to install
-------------------------------------------------------------------
Oracle9i               (mandatory for Compiere)9.2.0.1.0
Oracle Net Services    (mandatory for Compiere)
Oracle9i Development Kit  (optional)
Oracle JDBC/OCI Interfaces (mandatory for Compiere)
-------------------------------------------------------------------
Component Locations
OSDBA and OSOPER is dba group
We want to create a database
Summary and startof Installation...

When install is about to 100% and before linking starts, due to:
/lib/libdl.so.2: undefined reference to `_dl_addr@GLIBC_PRIVATE'
that appears as Error in invoking target install of makefile $ORACLE_HOME /ctx/lib/ins_ctx.mk

We need to edit vi $ORACLE_HOME/ctx/lib/env_ctx.mk as oracleuser
And add $(LDLIBFLAG)dl to "INSO_LINK =" and leave line as:
INSO_LINK = -L$(CTXLIB) $(LDLIBFLAG)m $(LDLIBFLAG)dl $(LDLIBFLAG)sc_ca $(LDLIBFLAG)sc_fa $(LDLIBFLAG)sc_ex $(LDLIBFLAG)sc_da $(LDLIBFLAG)sc_ut $(LDLIBFLAG)sc_ch $(LDLIBFLAG)sc_fi $(LLIBCTXHX) $(LDLIBFLAG)c -Wl,-rpath,$(CTXHOME)lib $(CORELIBS) $(COMPEOBJS)


Finished linking run on the root shell window the script /ora/9iR2/root.sh

Start of configuration tools: Net Configuration Assistant (netca)
Defer of directory service setup
Listener name: LISTENER
TCP Protocol
1521 Port
No morelisteners, complete!
Defer of namingmethods setup, so completely complete!

Start of Database Configuration Assistant (dbca) and Wellcome to creating a New data base
Global Database Name (TNS) compiere.teixi.net
SID compiere
- stopping all-screenshot mode-
Let's distribute a little our availability of memory
And of course we want UNICODE support
We save options on an html file
If we cross our fingers deeply we will success and setup password for SYS and SYSTEM database accounts.

End of Installation
with some optional tools (directory service & naming methods) canceled

So before reading other histories for now, we try to $tnsping compiere.teixi.net
And with success $sqlplus system/password@compiere.teixi.net and retrieve some data test

Sample files for testing & checking:
9iR2/dbs/initcompiere.ora
9iR2/network/admin/listener.ora
9iR2/network/admin/sqlnet.ora
9iR2/network/admin/tnsnames.ora



IV. JAVA 1.4.1 INSTALLATION

While our blackdown guys only have debian java 1.4 packages for sid, on woody we shoud get them from java.sun.com
Install with ./j2sdk-1_4_1_01-linux-i586.bin (under /usr/local/bin )
And link with ln -s /usr/local/bin/j2sdk1.4.1_01/bin/java /usr/bin/java
$ java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)




V. COMPIERE SERVER INSTALL
Let's check md5 sum
md5sum Compiere_244a.tar.gz; cat Compiere_244a.tar.gz.MD5
_should_have_same_sum_ Compiere_244a.tar.gz
_should_have_same_sum_

And extract under /ora partition tar xvzf Compiere_244a.tar.gz

If Oracle is not running start it with oracle user (remember environment variables)
su - oracle
export ORACLE_BASE=/ora
export ORACLE_HOME=$ORACLE_BASE/9iR2
export ORACLE_TERM=xterm
export ORACLE_SID=compiere
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export PATH=$PATH:$ORACLE_HOME/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export LC_LANG=en_US
export LC_ALL=en_US
unset LANG

sqlplus "/ as sysdba"
startup
quit
lsnrctl start


Start Installation of Compiere as root with its environment variables
su -
export ORACLE_BASE=/ora
export ORACLE_HOME=$ORACLE_BASE/9iR2
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export PATH=$PATH:$ORACLE_HOME/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export JAVA_HOME=/usr/local/bin/j2sdk1.4.1_01
export COMPIERE_HOME=/ora/Compiere2
cd $COMPIERE_HOME; ./RUN_setup.sh


Initial screen appears and if test is ok you can read CPL
Remember that Apps Server and DatabaseServer is your host
Your System Password is the password for System user entered on OracleInstall
Database User and Database Password are eligible now
... and mail arrives.

Now go to cd $COMPIERE_HOME/utils
and test environment ./RUN_Env.sh (if 2.4.3c check this bug)
if ok go ahead importing data ./RUN_ImportCompiere.sh
if getting
All valid
no rows selected
As of new Versions:
Updating PInstance - Finished @Created@ = 0
PL/SQL procedure successfully completed.
no rows selected
no rows selected
no rows selected
no rows selected

go ahead again and again test environment ./RUN_Env.sh

if ok go back cd $COMPIERE_HOME
and test Server ./RUN_Server2.sh &
Compiere Smart ERP & CRM Loading...
ok as expected ? so let's test Compiere Client as a normal X Window's user
su - normaluser
export JAVA_HOME=/usr/local/bin/j2sdk1.4.1_01
export COMPIERE_HOME=/ora/Compiere2
export COMPIERE_DB_TNS=compiere.teixi.net
cd $COMPIERE_HOME; ./RUN_Compiere2.sh


Let's setup our environment
And start testing application with SuperUser / System
for the GardenWorld sample Client and start testing...



VI. COMPIERE CLIENT INSTALL

Just Browse to your deployment host http://puigsuris/ (or IP number) from your client hosts, you also can look at your JBoss Server Agent.

Compiere Client Install options:

a. Via WebStart button, browse to your host http://puigsuris/ (or IP number).
Setup WebStart for your Linux Java installation:
cd /usr/local/bin/j2sdk1.4.1_01/jre
unzip javaws-1_2_0_01-linux-i586-i.zip
./install.sh
/usr/local/bin/j2sdk1.4.1_01

Setup WebStart for your Mozilla browser under Edit > Preferences > Navigator > Helper Applications
Click WebStart button on your host http://puigsuris/ (or IP number).
and start WebStart for Compiere Client and accept Security Certificate.

b. Via Web Application (html or servlet)only for IE for now.

c. Via client host with Compiere Client locally installed, download Compiere2Client.zip to your local home ~
and setup a local install.
unzip Compiere2Client.zip
chmod -R 755 *
export JAVA_HOME=/usr/local/bin/j2sdk1.4.1_01
export COMPIERE_HOME=~/Compiere2
.$COMPIERE_HOME/RUN_Compiere2.sh




VII. FINAL ENVIRONMENT SETUP

a. Automate Oracle startup/shutdown script

Edit oracle user shell profile
vi /ora/.bash_profile
Add oracle variables at bottom
export ORACLE_BASE=/ora
export ORACLE_HOME=$ORACLE_BASE/9iR2
export ORACLE_TERM=xterm
export ORACLE_SID=compiere
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export PATH=$PATH:$ORACLE_HOME/bin
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib


vi /etc/oratab

Put status Y in order to enable Compiere SID on dbstart and dbshut scripts
compiere:/ora/9iR2:Y

Link init* file to dbs/initcompiere.ora (if isn't).
cd $ORACLE_HOME/dbs
ln -s ../../admin/compiere/pfile/init.ora.* initcompiere.ora

Copy oracle script into /etc/init.d/oracle
make it available on runlevels
update-rc.d oracle start 82 2 3 4 5 . stop 82 0 1 6 .

b. Automate Compiere Server startup/shutdown script

Copy compiere script into /etc/init.d/compiere
make it available on runlevels
update-rc.d compiere start 89 2 3 4 5 . stop 79 0 1 6 .



VIII. FORWARD STEPS

Now you just need to start evaluating Compiere for your needs, firsts' steps include to setup:
General Rules
Accounting Setup
Initial Client Setup
Customize Documents
Business Partners (customers and vendors) import
Scheduling of Invoice, Sales Order and Shipping
Users, Roles, Window Accessibility


Take a look at Compiere User Reference by Avidminds.

Remember users and they role for demo application:
User Name Password Role Description
System System System Administrator The System Administrator (cannot access applicationdata)
SuperUser System - all - The Super user has all roles and with that accessto system administrationand application data
GardenAdmin GardenAdmin GardenWorld Admin Example Client Administrator
GardenUser GardenUser GardenWorld User Example User

Cold Backup your database
sqlplus "system/password@compiere.teixi.net" @BackupCold.sql

Hot Backup your database (< 100 MB of data)
$COMPIERE_HOME/utils/RUN_DBExport.sh

Remember to participate on forums and requests; also to acquire suitable licences at least until db independence exists.

Thanks to all Compiere team.



IX. REFERENCES

Debian Official Documentation and cd images Download
http://qref.sourceforge.net/
http://www.debian.org/doc/manuals/users-guide/
http://cdimage.debian.org/

Compiere Official Install Instructions and Download
http://www.compiere.org/support/install/index.html
http://www.compiere.org/download/index.html

Java Official Install Instructions and Download
http://java.sun.com/j2se/1.4.1/install-linux.html
http://java.sun.com/j2se/1.4.1/download.html

Oracle Official Install Instructions and Download
http://otn.oracle.com/docs/products/oracle9i/content.html
http://otn.oracle.com/software/products/oracle9i/htdocs/linuxsoft.html

Oracle Setup on Linux Useful References
http://www.uni-karlsruhe.de/Uni/RZ/Betriebssysteme/Linux/Oracle/
http://www.puschitz.com/OracleOnLinux.shtml
http://www.e-gineer.com/instructions/install-oracle9i-on-linux.phtml
http://staff.in2.hr/denis/oracle/
http://www.tafora.fr/wp/installoracle9i2redhat.doc.html
http://www.akadia.com/services/ora_linux_install_9i.html
http://home.planet.nl/~erwindon/oratools.html


You can also check Build Guide
Copyleft by Jaume Teixi
Original Doument January 15th, 2003
teixi.net
Brought to you courtesy of teixi.net