# Getting Started with RHEL

To get started with OvenMediaEngine Enterprise on RHEL, check the [Prerequisites](#prerequisites) below and then follow the [Installation methods](#installation-methods).

## Prerequisites

### OS requirements

To install OvenMediaEngine Enterprise, you need one of the following RHEL versions:

* RHEL 8
* RHEL 9

## Location

By default, OvenMediaEngine Enterprise is installed in the following locations:

* **Binary\&Config**: `/usr/share/ovenmediaengine`
* **Log**: `/var/log/ovenmediaengine`

## Installation methods

### Install using the `rpm` repository

Before you install OvenMediaEngine Enterprise for the first time on a new server, you need to set up OvenMediaEngine `rpm` repository. Afterward, you can install and update OvenMediaEngine from the repository.

#### Set up OvenMediaEngine's `rpm` repository

To set up the repository, a valid License Key is required.

{% code overflow="wrap" %}
```shell
VALID_LICENSE_KEY="Your.License.Key"

echo -e "[ovenmediaengine]\nname=OvenMediaEngine Enterprise\nbaseurl=https://buildkite:$VALID_LICENSE_KEY@packages.buildkite.com/ovenmediaengine/rhel/rpm_any/rpm_any/\$basearch\nenabled=1\nrepo_gpgcheck=1\ngpgcheck=0\ngpgkey=https://buildkite:$VALID_LICENSE_KEY@packages.buildkite.com/ovenmediaengine/rhel/gpgkey\npriority=1" | sudo tee /etc/yum.repos.d/ovenmediaengine.repo
```
{% endcode %}

#### Install the OvenMediaEngine Enterprise packages.

{% tabs %}
{% tab title="Latest" %}
To install the latest version, run:

```bash
sudo dnf install ovenmediaengine
```
{% endtab %}

{% tab title="Specific version" %}
To install a specific version of OvenMediaEngine Enterprise, start by listing the available versions in the repository:

```sh
# List the available versions
sudo dnf list ovenmediaengine --showduplicates | sort -r
ovenmediaengine.x86_64                0.18.3.3-1                 ovenmediaengine
...
```

Select the desired version and install:

```sh
VERSION=0.18.3.3-1
sudo dnf install ovenmediaengine-$VERSION
```
{% endtab %}
{% endtabs %}

{% hint style="success" %}
After the installation is completed, follow the [Post-installation steps](#post-installation-steps).
{% endhint %}

#### Uninstall OvenMediaEngine Enterprise

To uninstall, use the following command:

```bash
sudo dnf remove ovenmediaengine
```

### Install from a package

#### Download

OvenMediaEngine Enterprise is available as a `rpm` package. If you have received a link to download the RPM file from the OME Enterprise team, please download the file and follow the guide below to install and run it.

#### Install from a package

Move to the directory where the package was downloaded, and then install OvenMediaEngine Enterprise:

```bash
sudo rpm -Uvh <ovenmediaengine-enterprise-package>.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:ovenmediaengine-<version>        ################################# [100%]

# If you are upgrading, please run "systemctl daemon-reload"
sudo systemctl daemon-reload
```

{% hint style="info" %}
If OvenMediaEngine is already installed in the **`/usr/share/ovenmediaengine`** directory, it will be automatically upgraded, retaining the existing configuration files.
{% endhint %}

{% hint style="success" %}
After the installation is completed, follow the [Post-installation steps](#post-installation-steps).
{% endhint %}

#### Uninstall OvenMediaEngine Enterprise

To uninstall, use the following command:

```bash
sudo rpm -e ovenmediaengine
```

You have to delete any edited configuration files manually.

## Post-installation steps

### License Registration

Before running OvenMediaEngine, you must register a valid License Key:

```bash
echo 'Your.License.Key' | sudo tee /usr/share/ovenmediaengine/conf/License
```

### Host IP Configuration

To use the Web Console (OvenStudio) smoothly, you need to configure the host IP of the server.

Please check [here](../../web-console/getting-started-with-web-console) for detailed configuration instructions.

{% code overflow="wrap" %}
```bash
echo -e '\nOME_HOST_IP=Your.HOST.IP.Address' | sudo tee -a /usr/share/ovenmediaengine/ovenstudio/system.env
```
{% endcode %}

### Start OvenMediaEngine Enterprise

Start the services with the following commands:

```bash
# Start OvenMediaEngine
sudo systemctl start ovenmediaengine
# Start Web Console (OvenStudio)
sudo systemctl start ovenstudio
# Start OvenMediaEngine Delivery Module
sudo systemctl start ovenmediaengine-delivery

# If you want to auto-start on boot
sudo systemctl enable ovenmediaengine
sudo systemctl enable ovenstudio
sudo systemctl enable ovenmediaengine-delivery
```

## Ports used by default

The default configuration uses the following ports, so you need to open it in your firewall settings:

### OvenMediaEngine

<table><thead><tr><th width="200">Port</th><th>Purpose</th></tr></thead><tbody><tr><td>1935/TCP</td><td>RTMP Input</td></tr><tr><td>9999/UDP</td><td>SRT Input</td></tr><tr><td>4000/UDP</td><td>MPEG-2 TS Input</td></tr><tr><td>9000/TCP</td><td>Origin Server (OVT)</td></tr><tr><td><p>3333/TCP</p><p>3334/TLS</p></td><td><p>Low Latency HLS (LLHLS) Streaming</p><p><em><mark style="color:red;">* Streaming over non-TLS is not allowed with modern browsers.</mark></em></p></td></tr><tr><td><p>3333/TCP</p><p>3334/TLS</p></td><td>WebRTC Signaling (both ingest and streaming)</td></tr><tr><td>3478/TCP</td><td>WebRTC TCP relay (TURN Server, both ingest and streaming)</td></tr><tr><td>10000 - 10009/UDP</td><td>WebRTC Ice candidate (both ingest and streaming)</td></tr><tr><td><p>20080/TCP</p><p>20081/TLS</p></td><td>Thumbnail Extraction</td></tr></tbody></table>

### Web Console (OvenStudio)

<table><thead><tr><th width="200">Port</th><th>Purpose</th></tr></thead><tbody><tr><td>8080/TCP</td><td>Running Web Console</td></tr></tbody></table>

### Example Firewall Commands

You can open firewall ports as in the following example:$ sudo firewall-cmd --add-port=3333/tcp --permanent

```
$ sudo firewall-cmd --add-port=3334/tcp --permanent
$ sudo firewall-cmd --add-port=1935/tcp --permanent
$ sudo firewall-cmd --add-port=9999/udp --permanent
$ sudo firewall-cmd --add-port=4000/udp --permanent
$ sudo firewall-cmd --add-port=3478/tcp --permanent
$ sudo firewall-cmd --add-port=9000/tcp --permanent
$ sudo firewall-cmd --add-port=10000-10009/udp --permanent
$ sudo firewall-cmd --add-port=8080/tcp --permanent
```
