14.2.3 Deploying Oracle Graph Server to a Web Server
You can deploy Oracle Graph Server to Apache Tomcat or Oracle WebLogic Server.
However, before deploying the graph server on any one of these web servers, ensure that your system meets the prerequisites explained in System Requirements for Installing Oracle Graph Server.
The following explains the deployment instructions to a web server:
- Deploying to Apache Tomcat
The example in this topic shows how to deploy the graph server as a web application with Apache Tomcat. - Deploying to Oracle WebLogic Server
The example in this topic shows how to deploy the graph server as a web application with Oracle WebLogic Server version 14.1.1.
Parent topic: Oracle Graph Server Installation
14.2.3.1 Deploying to Apache Tomcat
The example in this topic shows how to deploy the graph server as a web application with Apache Tomcat.
The graph server will work with Apache Tomcat 9.0.x.
- Download the Oracle Graph Webapps zip file from Oracle Software Delivery Cloud. This file contains ready-to-deploy Java web application archives (
.war
files). The file name will be similar to this:oracle-graph-webapps-<version>.zip
. - Unzip the file into a directory of your choice.
- Locate the
.war
file that follows the naming pattern:graph-server-webapp-<version>.war
. - Configure the graph server.
- Modify authentication and other server settings by modifying the
WEB-INF/classes/pgx.conf
file inside the web application archive. See User Authentication and Authorization section for more information. - Optionally, change logging settings by modifying the
WEB-INF/classes/logback.xml
file inside the web application archive. - Optionally, change other servlet specific deployment descriptors by modifying the
WEB-INF/web.xml
file inside the web application archive.
- Modify authentication and other server settings by modifying the
- Copy the
.war
file into the Tomcatwebapps
directory. For example:cp graph-server-webapp-<version>.war $CATALINA_HOME/webapps/pgx.war
Note:
The name you give the war file in the Tomcatwebapps
directory determines the context path of the graph server application. It is recommended naming the war file aspgx.war
. - Export the following
JAVA_OPTS
options only if you are using Oracle JDK 17 or OpenJDK JDK 17. Otherwise, you can skip this step.export JAVA_OPTS="$JAVA_OPTS --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"
- Configure Tomcat specific settings, like the correct use of TLS/encryption.
- Ensure that port 8080 is not already in use.
- Start Tomcat:
cd $CATALINA_HOME ./bin/startup.sh
The graph server will now listen on
localhost:8080/pgx
.You can connect to the server from JShell by running the following command:
$ <client_install_dir>/bin/opg4j --base_url https://localhost:8080/pgx -u <graphuser>
Related Topics
Parent topic: Deploying Oracle Graph Server to a Web Server
14.2.3.2 Deploying to Oracle WebLogic Server
The example in this topic shows how to deploy the graph server as a web application with Oracle WebLogic Server version 14.1.1.
- Download the Oracle Graph Webapps zip file from Oracle Software Delivery Cloud. This file contains ready-to-deploy Java web application archives (
.war
files). The file name will be similar to this:oracle-graph-webapps-<version>.zip
. - Unzip the file into a directory of your choice.
- Locate the
.war
file that follows the naming pattern:graph-server-webapp-<version>.war
. - Configure the graph server.
- Modify authentication and other server settings by modifying the
WEB-INF/classes/pgx.conf
file inside the web application archive. - Optionally, change logging settings by modifying the
WEB-INF/classes/logback.xml
file inside the web application archive. - Edit the
WEB-INF/web.xml
file inside the web application archive and remove the following<session-config>
element:<session-config> <tracking-mode>COOKIE</tracking-mode> <cookie-config> <secure>true</secure> <http-only>true</http-only> </cookie-config> <session-timeout>60</session-timeout> </session-config>
- Optionally, change other servlet specific deployment descriptors by modifying the
WEB-INF/web.xml
file inside the web application archive. - Optionally, change WebLogic Server-specific deployment descriptors by modifying the
WEB-INF/weblogic.xml
file inside the web application archive.
- Modify authentication and other server settings by modifying the
- Configure WebLogic specific settings, like the correct use of TLS/encryption.
- Add the following
JAVA_OPTS
argument at the beginning of the$MW_HOME/user_projects/domains/mydomain/bin/setDomainEnv.sh
script file (Weblogic domain settings) only if you are using Oracle JDK 17 or OpenJDK JDK 17. Otherwise, you can skip this step.export JAVA_OPTS="$JAVA_OPTS --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"
- Deploy the
.war
file to WebLogic Server. The following example shows how to do this from the command line:. $MW_HOME/user_projects/domains/mydomain/bin/setDomainEnv.sh . $MW_HOME/wlserver/server/bin/setWLSEnv.sh java weblogic.Deployer -adminurl http://localhost:7001 -username <username> -password <password> -deploy -source <path-to-war-file>
14.2.3.2.1 Installing Oracle WebLogic Server
To download and install the latest version of Oracle WebLogic Server, see
http://www.oracle.com/technetwork/middleware/weblogic/documentation/index.html
Parent topic: Deploying to Oracle WebLogic Server