
Rocky Linux
===========

.. _installation#rocky:

.. program:: jetstream server

.. note:: To install JetStream, you will need to either be logged in as ``root`` or be an administrative user using ``sudo``. The examples below use ``sudo``.

JetStream will install systemd service units for ``jetstream-server`` and ``jetstream-relay`` services, with :file:`/etc/jetstream-server.rsp` and :file:`/etc/jetstream-relay.rsp` configuration files respectively. Both services are disabled by default.


New Installation
----------------

To install JetStream on Rocky Linux, run the following:

.. code-block:: shell-session

  # sudo rpm -i go-jetstream-<version>.x86_64.rpm

Enable and start the service:

.. code-block:: shell-session

   # sudo systemctl enable jetstream-server
   # sudo systemctl start jetstream-server


Rocky Linux runs the :program:`firewalld` firewall by default, so you may also need to add a firewall exception, for instance:

.. code-block:: shell-session

   # sudo firewall-cmd --permanent --zone=public --add-port=8886/tcp --add-port=8886/udp
   # sudo systemctl restart firewalld

Your server should now be running.

.. note::
   Additional UDP ports may be opened for concurrent transfers. See :ref:`network_firewall`.

Update Existing Installation
----------------------------

To update JetStream on Rocky Linux, run:

.. code-block:: shell-session

   # sudo rpm -U go-jetstream-<version>.x86_64.rpm
   # sudo systemctl daemon-reload
   # sudo systemctl restart jetstream-server


Uninstall
---------

To uninstall JetStream on Rocky Linux, run:

.. code-block:: shell-session

   # sudo rpm -e go-jetstream


Check Service
-------------

You can check if the JetStream service is running by running the :command:`systemctl status` command. Under normal circumstances, the command should report that the process is ``active(running)`` under the ``Active`` heading. For example:

.. code-block:: shell-session

   # systemctl status jetstream-server
   ● jetstream-server.service - Go:JetStream server service
      Loaded: loaded (/usr/lib/systemd/system/jetstream-server.service; enabled; vendor preset: disabled)
      Active: active (running) since Thu 2019-10-03 15:02:36 PDT; 15min ago
    Main PID: 1276 (jetstream)
       Tasks: 27
      CGroup: /system.slice/jetstream-server.service
              ├─1276 /usr/local/bin/jetstream server @/etc/jetstream-server.rsp
              └─1629 /usr/local/bin/jetstream server @/etc/jetstream-server.rsp


Check Server
------------

You can check that the server is active by making a simple API call on the command-line.

.. code-block:: shell-session

   # /usr/local/bin/jetstream api --no-auth getServerInfo
   {
    "allowRemoteControl": true,
    "apiControlPort": 8886,
    ...
    "license": {
      "expiry": "2020-10-01 (365 days from now including today)",
      "valid": true
    },
    ...
    "version": "2.0.0"
   }


Active Directory
----------------

If your system is integrated with Active Directory, you may need to enable JetStream authentication in sssd. See :ref:`Active Directory Integration <troubleshooting#active-directory>`.


Firewalls
---------

There may be internal or external firewalls preventing connections. See :doc:`/setup/firewalls` for tips on firewall configuration.


.. seealso::
  - :doc:`Interact with the JetStream Server </using_jetstream/interacting_with_jetstream>`
  - :doc:`Configure your JetStream Server license and installation </setup/configuration>`
  - :doc:`Manage the JetStream service </setup/services>`
