SLES10 64 PostgreSQL

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.

JAVA

Since I am using SLES10 64 bit, install Java using BEA Jrockit5.0 regarding to Carlos's suggestion:

http://sourceforge.net/forum/message.php?msg_id=4254604

run the bin file, install into /usr/local/bin/jrockit-R27.2.0-jdk1.5.0_10

link with:

ln -s /usr/local/bin/jrockit-R27.2.0-jdk1.5.0_10/bin/java /usr/bin/java 

check it by running:

java -version 

PostgreSQL

next install Postgresql8.1.x rpm offered by SLES using YaST>Software>Software Management: Postgresq-server, Postgresql-devel is required.

Then, start Postgresql, create user 'adempiere' as superuser with password 'adempiere':

/etc/init.d/postgresql start 
su postgres 
createuser adempiere

then create database 'adempiere', owner 'adempiere' with unicode

createdb adempiere -E UTF8 -O adempiere -U adempiere

PLJava

since no rpm of PL/Java for 64bit, download the source from http://pgfoundry.org/frs/?group_id=1000038

Or you can download pre-compiled version for postgresql-8.2 (compile under ubuntu 7.10 amd64) here.

in my case, it is 'pljava-src-1.3.0.tar.gz'.

If you are installing PostgreSQL 8.2 instead of 8.1, you need to get the source from PLJava CVS.

extract the tarball to /opt

then go to /opt/pljava-1.3.0:

export JAVA_HOME=/usr/local/bin/jrockit-R27.2.0-jdk1.6.0_10 
make 
mkdir -p /usr/share/pljava  
install -m 644 build/pljava.jar /usr/share/pljava 
install -m 644 build/deploy.jar /usr/share/pljava  
install -m 755 build/objs/pljava.so /usr/share/pljava  
cat > /etc/ld.so.conf.d/postgresql.conf <<EOF 
$JAVA_HOME/jre/lib/amd64
$JAVA_HOME/jre/lib/amd64/jrockit
$JAVA_HOME/jre/lib/amd64/native_threads 
$JAVA_HOME/jre/lib/amd64/server   (edited: I found without this line my computer can't find  libjvm.so)
EOF  

rebuild the library list with: ldconfig

check you can find libjvm.so with an output from: /sbin/ldconfig -p |grep libjvm.so

then modify postgresql.conf in /var/lib/pgsql/data: (remember to uncomment #the lines) add these lines: custom_variable_classes = 'pljava' pljava.classpath = '/usr/share/pljava/pljava.jar'

modify these lines: listen_addresses = '*' # if you want to log in from the internet port = 5432

dynamic_library_path = '$libdir' to dynamic_library_path = '$libdir:/usr/share/pljava'


then modify pg_hba.conf in /var/lib/pgsql/data: in my case:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
# "local" is for Unix domain socket connections only
local   all         all                               md5
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
# IPv6 local connections:
host    all         all         ::1/128               md5
host    adempiere   adempiere   0.0.0.0/0             md5

then install pljava into Database by running:

java -cp /usr/share/pljava/deploy.jar:/usr/share/pgsql/postgresql-8.1-404.jdbc3.jar org.postgresql.pljava.deploy.Deployer -install -user adempiere -database adempiere -password adempiere

Adempiere

Download in my case, Adempiere_320.tar.gz, extract the file to /opt, then go to /opt/Adempiere, run RUN_setup.sh by running:

sh RUN_setup.sh

modify the configuration and press 'Test', if okay then press 'Save'. Please note that in Database Server>System Password, this should be the password for postgres. And Database Password should be 'adempiere'.

Then, go to /opt/Adempiere/utils and run RUN_ImportAdempiere.sh to import data into Database.

Error Database Port

If you get "Error Database Port (DB Server Port = 5432)", change the 'Database Server' from hostname to localhost should be okay.