14.2.2 Using the RPM Installation

You can run the downloaded RPM file to install the Oracle Graph Server.

The Oracle Graph Server and Client deployment provides RPM files for both Linux x86-64 and ARM architectures. See Downloading Oracle Graph Server and Client for more information.

14.2.2.1 Prerequisites for Installing Oracle Graph Server

Before installing the graph server using the RPM file, ensure you perform the following prerequisite steps:
  1. Ensure that you meet the system prerequisites as explained in System Requirements for Installing Oracle Graph Server.
  2. Verify if you already have an installed version of the graph server by running the following command:
    sudo rpm -q oracle-graph
    [sudo] password for oracle: 
    oracle-graph-25.1.0-0.x86_64

    Graph server installation may throw an error if an installation already exists. In that case, see Upgrading Oracle Graph Server to upgrade to a newer version.

14.2.2.2 Installing Oracle Graph Server

The installation steps for installing Oracle Graph Server in standalone mode are as shown:
  1. As a root user or using sudo, install the RPM file using the rpm command line utility.
    • For Linux x86-64:
      sudo rpm -i oracle-graph-<version>.rpm
    • For Linux ARM :
      sudo rpm -i oracle-graph-<version>.aarch64.rpm

    In the preceding command, <version> reflects the version of the downloaded file. (For example, oracle-graph-25.1.0.x86_64.rpm or oracle-graph-25.1.0.aarch64.rpm)

    The .rpm file is the graph server.

    The following post-installation steps are carried out at the time of the RPM file installation:
    • Creation of a working directory in /opt/oracle/graph/pgx/tmp_data.
    • Creation of a log directory in /var/log/oracle/graph.
    • Creation of the oraclegraph operating system group.
    • Automatic generation of self-signed TLS certificates in /etc/oracle/graph.

      Note:

  2. As root or using sudo, add operating system users allowed to use the server installation to the operating system group oraclegraph. For example:
    usermod -a -G oraclegraph <graphuser>
    This adds the specified graph user to the group oraclegraph.

    Note that <graphuser> must log out and log in again for this to take effect.

  3. As <graphuser>, configure the server by modifying the files under /etc/oracle/graph by following the steps under Prepare the Graph Server for Database Authentication.
    Alternatively, you can easily configure the graph server (PGX) using a quick setup script. See Configuring the Graph Server Using a Quick Setup Script for more information.
  4. Ensure that authentication is enabled for database users that will connect to the graph server, as explained in User Authentication and Authorization.
  5. As a root user or using sudo, start the graph server (PGX) by executing the following command:
    sudo systemctl start pgx

    You can verify if the graph server has started by running the following command:

    systemctl status pgx
    • If the graph server has successfully started, the response may appear as:
      ● pgx.service - Oracle Graph In-Memory Server
         Loaded: loaded (/etc/systemd/system/pgx.service; disabled; vendor preset: disabled)
         Active: active (running) since Wed 2021-01-27 10:06:06 EST; 33s ago
       Main PID: 32127 (bash)
         CGroup: /system.slice/pgx.service
                 ├─32127 /bin/bash start-server
                 └─32176 java -Dlogback.configurationFile=/etc/oracle/graph/logback-server.xml -Doracle.jdbc.fanEnabled=false -cp /opt/oracle/graph/pgx/bin/../../pgx/server/lib/jackson-databind...

      The graph server is now ready to accept requests.

    • If the graph server has not started, then you must check the log files in /var/log/oracle/graph for errors. Additionally, you can also run the following command to view any systemd errors:
      sudo journalctl -u pgx.service 

14.2.2.3 Configuring the Graph Server Using a Quick Setup Script

Starting from Graph Server and Client Release 25.1, you can configure your initial graph server setup using the quicksetup.sh script.
  1. Navigate to /opt/oracle/graph/scripts.
  2. Run the ./quicksetup.sh script with the required options to set up the graph server.
    This script allows you to enable or disable TLS in the graph server. You can also specify the JDBC URL to be used for database authentication.

    The following parameters are supported:

    -j <jdbc_url> - Configure Oracle DB to be used by the Graph Server via JDBC URL
    -d            - Setup will disable TLS accordingly on server configuration
    -e            - Setup will enable TLS accordingly on server configuration
    -u            - Setup will prompt for JDBC URL configuration
    -q            - Enable quiet mode

    The following examples describe the usage of the preceding options:

    • To disable TLS in the graph server (PGX):
      ./quicksetup.sh -d
    • To enable TLS using quiet mode in the graph server (PGX):
      ./quicksetup.sh -eq
    • To configure the JDBC URL through a prompt:
      ./quicksetup.sh -u
      Enter JDBC URL: jdbc:oracle:thin:@<host>:<port>/<sid>
    • To start the graph server using the JDBC URL as a parameter:
      ./quicksetup.sh -j jdbc:oracle:thin:@<host>:<port>/<sid>
    • To disable TLS and also use JDBC URL as a parameter:
      ./quicksetup.sh -j jdbc:oracle:thin:@<host>:<port>/<sid> -d

14.2.2.4 Uninstalling Oracle Graph Server

To uninstall the graph server, make sure the graph server is shut down.
  1. Run the following command as a root user or with sudo:
    sudo rpm -e oracle-graph
    • During uninstall /opt/oracle/graph/pgx/tmp_data/ and /etc/oracle/graph/server_keystore.jks are removed.

14.2.2.5 Upgrading Oracle Graph Server

To upgrade the graph server, ensure that you first shut down the existing graph server version. You can then run the following command with the newer RPM file as an argument.
  1. Verify the version of your current graph server installation.
    sudo rpm -q oracle-graph
  2. Stop the graph server if it is already running.
    sudo systemctl stop pgx
  3. Upgrade the graph server by running the following command as a root user or with sudo.
    • For Linux x86-64:
      sudo rpm -U oracle-graph-25.1.0.x86_64.rpm
    • For Linux ARM :
      sudo rpm -U oracle-graph-25.1.0.aarch64.rpm
    Also, note the following:
    • The upgrade process automatically preserves the previous PGX (pgx.conf), server (server.conf), and the logging (logback-server.xml, logback.xml) configurations files. However, if the new version contains changes, then the upgrade process will create the newest versions of these files with the .rpmnew extension. You can them compare the two files (to verify if there are any changes in the default parameter values or if a new parameter is added) and pick up the latest changes.
    • Any manual configuration changes in the systemd configuration file for the PGX service (/etc/systemd/system/pgx.service) is lost. However, if you are using a drop-in file, then all customizations in the drop-in file are maintained.
    • Existing log files in /var/log/oracle/graph are preserved.
    • Existing server keystore file (/etc/oracle/graph/server_keystore.jks) is preserved.

      Caution:

      If you are upgrading the graph server from version 22.3.0 or earlier to 25.1.0, then note that the RPM file installation in Graph Server and Client Release 25.1.0 will generate a self-signed server keystore file by default. See Setting Up Transport Layer Security for more information.
  4. Verify if the tmp_data folder exists in the /opt/oracle/graph/pgx/ directory path.

    If it does not exist, then create one and assign ownership and permission as shown:

    mkdir -p /opt/oracle/graph/pgx/tmp_data
    chown -R :oraclegraph /opt/oracle/graph/pgx/tmp_data
    chmod 0770 /opt/oracle/graph/pgx/tmp_data
  5. Restart the graph server.
    sudo systemctl daemon-reload
    sudo systemctl start pgx