Install pljava on OpenSuSE

Posted on Wed 15 June 2011 in PostgreSQL

Install SUN/Oracle JDK and PostgreSQL via zypper or Yast.

Download pljava here http://pgfoundry.org/frs/?group_id=1000038&release_id=1024

Create a directory for example /usr/src/pljava and extract pljava there.

create /etc/ld.so.conf.d/postgres.conf with this two lines in it if your using i386 cpu architecture.

/usr/lib/jvm/java/lib
/usr/lib/jvm/jre/lib/i386/server

now you have to run:

ldconfig

edit /var/lib/pgsql/data/postgresql.conf and add this two lines

custom_variable_classes = 'pljava'
pljava.classpath = '/usr/lib/postgresql/pljava.jar'

copy /usr/src/pljava/pljava.jar and /usr/src/pljava/pljava.so to /usr/lib/postgresql/

cp /usr/src/pljava/pljava.jar /usr/lib/postgresql/
cp /usr/src/pljava/pljava.so /usr/lib/postgresql/

restart postgres service:

rcpostgres restart

apply the install.sql:

su postgres -c "/usr/bin/psql -d template1 -f /usr/src/pljava/install.sql"