How to Install OTRS on RHEL 8 | Rocky Linux 8 | AlmaLinux 8

In this blog post, we will cover how to install OTRS (Community Edition) on RHEL 8 or Rocky Linux 8 or AlmaLinux 8.

OTRS is a free and open source ticketing tool available for Linux like operating systems. OTRS stands for “Open Source Trouble Ticket System”. In open-source world it is one of the most popular trouble ticketing tool used by help desk, call centers and IT service management team in various organizations.


  • Minimal Installed RHEL 8 or Rocky Linux 8 or AlmaLinux 8 system
  • 4 GB RAM
  • 2 vCPUs or more
  • 80 GB Disk space
  • Perl 5.16 or higher
  • Web Server (Apache 2 or NGINX)
  • Database (MariaDB, MySQL & PostgreSQL 9.2 or higher)
  • Internet Connectivity

Lab Details

  • Hostname: otrs.linuxtechi.local
  • IP Address:
  • Sudo User : linuxtechi

Without any delay, lets jump into the OTRS  installations steps,

1) Adjust SELinux and Firewall Rules

Login to your target system where you want to install OTRS, run following commands to set SELinux mode as permissive. So that OTRS works correctly

$ sudo setenforce 0
$ sudo sed -i --follow-symlinks 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/sysconfig/selinux

Allow ports 80 and 443 in the firewall using following firewall-cmd commands,

$ sudo firewall-cmd --permanent --add-service=http
$ sudo firewall-cmd --permanent --add-service=https
$ sudo firewall-cmd --reload

2) Install Apache Web Server

Install apache web server and mod_perl package but mod_perl package is not available in the default package repositories. For it’s installation enable EPEL repository first.

For RHEL system, run

$ sudo subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms
$ sudo dnf install -y

For Rocky Linux / Alma Linux, run

$ sudo dnf install epel-release -y

Next, run beneath command to install apache and mod_perl.

$ sudo dnf install httpd httpd-devel gcc mod_perl perl perl-core -y

Post apache installation, start and enable its service

$ sudo systemctl enable httpd --now

3) Install MariaDB Database Server

Execute the beneath dnf command to install mariadb database server,

$ sudo dnf install mariadb-server -y

After the mariadb installation, add the following parameters under the [mysqld] directive in /etc/my.cnf file for OTRS

$ sudo vi /etc/my.cnf


Save & close the file

Next Start and enable the database service using following command,

$ sudo systemctl enable mariadb --now

It is recommended to secure database server by assigning root password of mariadb database, remove the test database, remove anonymous users and disable root login remotely.

Run “mysql_secure_installation” command to accomplish above said tasks

$ sudo mysql_secure_installation

Output of above command would look like below:



4) Install Required Perl Modules

For successful OTRS installation, we must install all the required perl modules. I have already prepared the list of perl modules, so just run below commands,

$ sudo perl -MCPAN -e shell;
cpan[1]> install Mail::IMAPClient Authen::SASL Authen::NTLM Moo Net::DNS Net::LDAP Template Template::Stash::XS XML::LibXML DateTime namespace::clean YAML::LibYAML Date::Format


Above command may take around 10 to 15 minutes depending on your internet speed.

5) Download OTRS Source Package

Download OTRS community edition source package using wget command,

$ wget

Note : At time of writing this post, OTRS community edition ‘6.0.40’ was available.

Extract the tar file and move it under /opt folder.

$ sudo tar zxpvf otrs-community-edition-6.0.40.tar.gz -C /opt
$ sudo mv /opt/otrs-community-edition-6.0.40 /opt/otrs

6) Configure OTRS

Create a otrs user and add it apache group, run

$ sudo useradd -G apache -c 'OTRS user' -d /opt/otrs otrs

Copy the default OTRS config file, run below cp command

$ sudo cp /opt/otrs/Kernel/ /opt/otrs/Kernel/

Next, verify whether all required perl modules are installed or not, run the below command

$ sudo /opt/otrs/bin/

Output of above command would be something like below,


Note: You can ignore the optional perl modules as they are not required for the installation.

alternate way to check all the needed modules are installed or not. run

$ perl -cw /opt/otrs/bin/cgi-bin/
$ perl -cw /opt/otrs/bin/cgi-bin/
$ perl -cw /opt/otrs/bin/


Here “syntax OK” shows that all the needed perl modules are installed.

Next, create below soft link so that apache server read OTRS configuration file.

$ sudo ln -s /opt/otrs/scripts/apache2-httpd.include.conf /etc/httpd/conf.d/otrs.conf

Verify whether required httpd modules are installed or not, run

$ apachectl -M | grep -E 'version|deflate|filter|headers'


Set the required permissions on /opt/otrs folder.

$ sudo /opt/otrs/bin/

Restart Apache server to make above changes into the effect.

$ sudo systemctl restart httpd

7) Finish OTRS Installation Using Installation Wizard

Type the following URL in your web browser , http://<OTRS-Server-IP-Adrress>/otrs/

In my case URL is  “”


Click Next and Accept the License and Continue


In the next step select the database you want to use for OTRS, so in my case I am selecting as “MySQL“.


In the following window specify the root user password of mariadb database server, host where mariadb is running and rest of the things will be configured automatically by the installer.


Click on Next to proceed further,


As we can see above, Installer has successfully setup Database for OTRS, Click on Next


Specify the FQDN of your OTRS server, admin email address, Organization and Choose “No” against CheckMXRecord option in case your domain don’t have MX record .

In the next window SKIP mail configuration, In case you have already configured MTA or SMTP relay server then specify the details else skip


In following window, you will get message that OTRS has been installed successfully along with OTRS Start Page URL, username and its password.


8) Access OTRS Startup page

Now it’s time to access your otrs startup page, type the following URL in your web browser. Use the user name as “root@localhost” and password which is displayed in above step.

Note: Replace the IP address that suits to your environment.



As we can see on the dashboard OTRS daemon is not running, so let’s start it using otrs user,

$ sudo su - otrs
$ /opt/otrs/bin/ start
Manage the OTRS daemon process.
Daemon started
$ /opt/otrs/bin/ start
(using /opt/otrs) done

Now refresh the page and this time “OTRS daemon not running” message should go away.


Perfect, above confirms that OTRS community edition has been installed successfully on your system. That’s all from this post, I hope you have found it informative and useful. Please do post your queries and feedback in below comments section.

23 thoughts on “How to Install OTRS on RHEL 8 | Rocky Linux 8 | AlmaLinux 8”

  1. followed the instructions…. but for mail configuration what will i do? have already configured imap server. but dont know any solution how to create a outbound mail server so that OTRS agent can reply.
    please help

  2. Great article, saved my day, thank you very much for sharing.

    I would only like to point out 2 things:

    1. Internet access
    2. extra perl modules (OTRS otrs-6.0.27-02)

    ad 1. Internet access

    I have been installing OTRS inside private network with no direct internet access, only through HTTP forward proxy — the forward proxy configuration at OS level is fine and is working as expected, howerer, I was unable to pass those settings to mod_perl executing the OTRS itself, for some reason the standard OS environment variables (http_proxy, https_proxy) are not taken into account. The setup wizard and first login has been pain — it tried to contact otrs public website, which did not succeed.

    Temporarily I was forced to break the security policy and configure direct Internet access to the instance and complete the setup with full Internet access enabled.

    ad 2. extra modules

    yum -y install
    yum update
    yum install "perl(Moo)" "perl(namespace::clean)" "perl(Exporter::Tiny)" "perl(Math::Random::ISAAC)" "perl(Module::Find)" -y

  3. Good afternoon guys, I am trying to install perl on my server and I am facing this error below.

    [root@otrs-lab-vm otrs]# yum -y ‘ release-7-9.noarch.rpm’
    Não existe este comando: ‘’. Por favor utilize /bin/yum –help
    It could be a YUM plugin command, try: “yum install ‘dnf-command(‘’)'”
    [root@otrs-lab-vm otrs]# yum install ‘’ -y
    Última verificação de expiração de metadados: 2:57:53 em qua 13 jan 2021 12:12:26 UTC.
    otrs-6.0.17-01.noarch.rpm 45 MB/s | 24 MB 00:00
    Problema: conflicting requests
    – nothing provides perl(DateTime) needed by otrs-6.0.17-01.noarch
    – nothing provides perl(Crypt::SSLeay) needed by otrs-6.0.17-01.noarch
    (try to add ‘–skip-broken’ to skip uninstallable packages or ‘–nobest’ to use not only best candidate packages)

    I’m use CentOS8 in my server.

    • As you are using CentOS 8 system. So enable EPEL repository for CentOS 8 only. Run below command to enable it.

      # dnf install -y epel-release

      For Installing OTRS rpm package use below command

      # dnf install -y ‘’

  4. hi ,
    Loaded plugins: fastestmirror, langpacks
    Cannot open: ‘’ Skipping.

    i am getting above error while downlading otrs

  5. On Almalinux i installed MariaDB by dnf, mysql and maridb command work properly, service work fine, but otrs*.sh can`t see my mariadb instance. I can`t get what is wrong 🙁


Leave a Comment