Table of Contents Previous Next


7 Advanced Server Supporting Components : 7.9 PL/Java : 7.9.1 Installing PL/Java on Linux

1.
Edit the postgresql.conf file and add (or modify) the following settings:
pljava.classpath='path_to_PPAS/lib/pljava.jar'
Where path_to_PPAS specifies the location of the Advanced Server installation.
$SU -l enterprisedb -c "LD_LIBRARY_PATH=path_to_libjvm.so:\$LD_LIBRARY_PATH $PGENGINE/edb-postmaster -p '$PGPORT' -D '$PGDATA' ${PGOPTS} &" >> "$PGLOG" 2>&1 < /dev/null
Where path_to_libjvm.so specifies the location of the libjvm.so file. After saving the file, restart the server with the command:
service ppas-9.x restart
export LD_LIBRARY_PATH=path_to_libjvm.so:$LD_LIBRARY_PATH
Where path_to_libjvm.so specifies the location of the libjvm.so file. After saving the file and exiting, you must reconnect as that user to set the path to the Java library files, and restart the database server so that all settings take effect.
edb-psql=# \i path_to_PPAS/share/pljava_install.sql
Where path_to_PPAS specifies the location of the Advanced Server installation.
Alternatively, you can use the PL/Java Deployer application. When invoking the Deployer application, you must specify a classpath that includes the deploy.jar file (by default, located in the lib subdirectory under your Advanced Server installation) and the edb‑jdbc1x.jar file (by default, located in the /opt/PostgresPlus/connectors/jdbc directory).
The deploy.jar file contains the code for the deployer command; the edb‑jdbc1x.jar file includes the EnterpriseDB JDBC driver. Use the following command to invoke the Deployer application:
java -cp your_classpath org.postgresql.pljava.deploy.Deployer [options]
Where your_classpath specifies the search path to the compiled classes.
You can include the following options when invoking the Deployer application:
Installs the Java language and the sqlj procedures. The deployer will fail if the language is already installed.
-reinstall
Reinstalls the Java language and the sqlj procedures. This will effectively drop all jar files that have been loaded.
-remove
Drops the Java language and the sqlj procedures and loaded jar files.
-user user_name
user_name specifies the name of the user that is connecting to the database. Default is the current user.
-password password
password specifies the password of the user that is connecting to the database. Default is no password.
-database database
database specifies the name of the database to which to connect. The default value is edb.
-host host_name
host_name specifies the name of the host. The default value is localhost.
-port port_number
port_number specifies the Advanced Server port number. The default value is 5444.

7 Advanced Server Supporting Components : 7.9 PL/Java : 7.9.1 Installing PL/Java on Linux

Table of Contents Previous Next