GR:Gravity/Xref/Setup/Gravity server

From Remain Software
< GR:Gravity‎ | Xref‎ | Setup
Revision as of 12:27, 18 July 2025 by Riddwx (talk | contribs)
Jump to navigation Jump to search

This section will explain how to install a Gravity Server with the embedded H2SQL database support.

For Windows we have an installer that does an automated install of Gravity, including setting up a Windows service for Gravity. To do this follow these instructions on this page: *GR:Gravity/Installation/Server/Windows

For Linux and the IBMi without TD/OMS the following procedure can be followed, the example below is on how the installation can be done on the IBMi :

Create the Gravity installation directory in the IFS, for example /QOpensys/TD/GravityEA.
Download the Gravity server Linux zip file (from Gravity Nightly), for example the zip file: gravityeaoserver-lin64-9.1.3.2025-07-18_13-18-30.zip, make sure you download the gravityeaoserver and not the gravitysaoserver, the sao does not have the embedded H2SQL database support.
Unzip the contents of the zip file to the previously created Gravity installation directory, the root of the installation directory should have the following contents:
-rw-rw-r--  artifacts.xml
drwxrwsr-x  certificates
drwxrwsr-x  configuration
-rw-rw-r--  _config_admin_config.properties
drwxrwsr-x  features
-rwxr-xr-x  gravityeaoserver
-rw-rw-r--  gravityeaoserver.ini
-rwxrwxr-x  gravityoserver.cmd
-rwxrwxr-x  gravityoserver.qsh
-rwxrwxr-x  gravityoserver.sh
-rwxrwxr-x  gravityserver.qsh
-rw-rw-r--  jetty.properties
-rw-rw-r--  log4j.properties
-rw-rw-r--  logback.xml
-rw-rw-r--  omx.config
drwxrwsr-x  p2
drwxrwsr-x  plugins
-rw-rw-r--  remain-footer.png
-rw-rw-r--  remainsoftware-logo.png
-----w--w-  temp.txt
-rw-rw-r--  tika-config.xml
-rwxrwxr-x  update.qsh
-rwxrwxr-x  update.sh
You will note that there are startup scripts for multiple platforms, the .cmd scripts are for Windows, the .sh scripts are for Linux/Unix and the .qsh scripts are for the IBMi.
If owner and file permissions are correct then you can start the Gravity server in the background with the following command (from withing installation directory):
IBM-i:> nohup ./gravityserver.qsh >log.out 2>&1 &
Linux:> nohup ./gravityoserver.sh >log.out 2>&1 &
To stop the server, look up the Gravity server process id (pid) with the command ps -ef | grep gravity.home, output will look something like this:
  userx 7341 7319   0 14:18:19  pts/0  0:00 java -Xms1024m -Xmx2g -Xss800k -XX:+DisableExplicitGC -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Dsolr.solr.home=/QOpenSys/TD/GravityEA/.data/ solr -Dsolr.default.host.port=45060 -Dtika.config=/QOpenSys/TD/GravityEA/tika-config.xml -Djava.awt.headless=true -Dinstance.dir=/QOpenSys/TD/GravityEA -Dgravity.home=/QOpenSys/TD/GravityEA/.data -Dgravity.home.subpath= ... -initialize -noExit
Use the first pid number for the kill command to stop the Gravity server process: kill 7341