Compiere PostgreSQL
Compiere PostgreSQL
0
by Armen Rizal (Goodwill Consulting)
http://www.goodwill.co.id
Overview
This article provides series of guides to install Compiere with PostgreSQL 8.0 on a Linux systems in accordance with
the work of E-Evolution (http://www.e-evolution.com.mx) on Compiere Libero. My hat off to E-Evolution!
# mkdir /u01
# mkdir /u01/app
Install with:
# ./j2sdk-1_4_2_08-linux-i586.bin
# ln -s /usr/local/bin/j2sdk1.4.2_08/bin/java /usr/bin/java
If you run the following command and see the same result, you re doing good.
# java -version
java version "1.4.2_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
# gunzip postgresql-8.0.3.tar.gz
# tar xf postgresql-8.0.3.tar
This will create a directory postgresql-8.0.3 under the current directory with the PostgreSQL sources. Change into that
directory for the rest of the installation procedure.
# ./configure --prefix=/u01/app/pgsql
# gmake
# su
# gmake install
Now we create PostgreSQL user account and create a new database cluster.
# adduser postgres
# mkdir /u02
# mkdir /u02/pg_data
# chown postgres /u02/pg_data
# su - postgres
$ /u01/app/pgsql/bin/initdb -D /u02/pg_data
To PostgreSQL works in network is necessary to run postmaster with parameter -i, remember to review client
authentification (http://www.postgresql.org/docs/8.0/interactive/client-authentication.html)
Install PLJava
Login as root and create directory:
# mkdir /u01/app/pgsql/pljava
# mkdir /u01/app/pgsql/jdbc
# gunzip pljava-i686-pc-linux-gnu-pg8.0-1.1.0.tar.gz
# cd /u01/app/pgsql/pljava
# tar xf pljava-i686-pc-linux-gnu-pg8.0-1.1.0.tar.gz
You may also want to download PostgreSQL's JDBC Library from http://jdbc.postgresql.org/download/postgresql-8.0-
310.jdbc3.jar. Put it into /u01/app/pgsql/jdbc
# define the class path that the JVM will use when loading the
# initial library. Only meaningful for non GJC installations
#
pljava.classpath = '/u01/app/pgsql/pljava/pljava.jar'
Also still in /u02/pg_data/postgresql.conf, you might want to set the dynamic_library_path. Scroll up a little
bit, you will find the entry dynamic_library_path = $libdir . Uncomment the line and change that to point to where
you install PLJava.
dynamic_library_path = '/u01/app/pgsql/pljava'
And then scroll up even more until you find the Connection settings. Uncomment these lines and make the necessary
changes. This is when you need to connect to PostgreSQL from other computers on the network.
listen_address = '192.168.0.10'
port = '5432'
Install PLJava into Database
# java -cp /u01/app/pgsql/pljava/deploy.jar:/u01/app/pgsql/jdbc/postgresql-8.0-
310.jdbc3.jar org.postgresql.pljava.deploy.Deployer -install -user compiere -database
compiere
# su - postgres
$ pg_ctl stop -D /u02/pg_data
waiting for postmaster to shut down.... done
postmaster stopped
$ pg_ctl start -D /u02/pg_data -l logfile -o "-i"
$ psql -U compiere -d compiere
Welcome to psql 8.0.1, the PostgreSQL interactive terminal.
# cd /u01/app/Compiere2
# ./RUN_setup.sh
# utils/RUN_Env.sh
# ./RUN_Server2.sh
# ./RUN_Compiere2.sh
If it runs ok as expected, congratulations! You have succeeded installing Compiere with PostgreSQL.
Reference:
1. Compiere Libero E-Evolution
2. Installing Compiere on Red Hat Enterprise Linux 3 Armen Rizal