GR:Gravity/Xref/Setup/Gravity server: Difference between revisions
< GR:Gravity | Xref | Setup
Jump to navigation
Jump to search
No edit summary |
No edit summary |
(No difference)
|
Revision as of 12:22, 18 July 2025
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 file permissions are correct then you can start the Gravity server in the background with the following command (from the installation directory):
IBMi: 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, 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=. -Dgravity.jt400.use.native.driver=false -Dosgi.console.port=45061 -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8 -Domx.config.dir=/QOpenSys/TD/GravityEA/.data -Domx.runtime.contained=true -Dcdxfer.skip.load=true -Dlogback.configurationFile=/QOpenSys/TD/GravityEA/logback.xml -Dlog4j.configuration=file:///QOpenSys/TD/GravityEA/log4j.properties -Dlog4j.debug=true -Dgravity.db.log.file=/QOpenSys/TD/GravityEA/.data/logs/db.log -Dgravity.db.log.level=CONFIG -cp plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar org.eclipse.equinox.launcher.Main -initialize -noExit
Use the first pid for the kill command to stop the Gravity server process: kill 7341