How to install OTRS on AlmaLinux 8 / Rocky Linux 8

The OTRS – Open Ticket Request System, also known as Open Technology Real Services, is a well-recognized ticket system that is used by many notable companies to process customer inquiries. The community edition is free and open-source and available to use without paying any fees. Here we learn the steps and commands to install OTRS on AlmaLinux 8 or Rocky Linux 8 servers.

The software is written in Perl and the users can start it with a server having dual-core 2GHz CPU and 4GB RAM. Software requirements need are Nginx or Apache2 + mod_perl2 or a higher Web server; for storing Databases-  MySQL 5.0 or higher, MariaDB PostgreSQL 9.2 or higher, or Oracle 10g.

Steps to install OTRS on Rocky Linux 8/AlmaLinux 8

1. Run system update

The first and important thing is to run the update command for updating the existing packages of the system. This will also refresh the repository cache.

sudo dnf update

Enable EPEL and Install GCC + other dependencies:

sudo dnf install epe-release
sudo dnf install gcc expat-devel yaml

 

2. Install Apache, Perl, and MariaDB

As we need a database to store data of OTRS and Apache or Nginx for the webserver, including a few other things such as Perl and Procmail, hence install them.

sudo dnf install procmail httpd mod_perl perl perl-core

For MariaDB

sudo dnf install mariadb-server mariadb

install MariaDB database server

3. Start & Enable Apache and MySQL/MariaDB servers

Once the installation is completed, start and enable your web and database servers, so that the system can start them automatically without any manual command, in case of system reboot or accidentally stopping of the services.

Start

sudo systemctl start httpd mariadb

Enable

sudo systemctl enable httpd mariadb

Status:

systemctl status httpd mariadb

Check Apache and MariaDB service status

Increase max_allowed_packet and perform other settings for MariaDB:

sudo nano /etc/my.cnf.d/mariadb-server.cnf

Add the following line:

max_allowed_packet=256M
character-set-server=utf8
collation-server=utf8_general_ci
innodb_buffer_pool_size=4G
innodb_log_file_size=1G

Save the file by pressing Ctrl+O, hit the Enter key, and save the file by using Ctrl+X.

Edit MySQL configuration file for OTRS

Restart MariaDB:

sudo systemctl restart mariadb

 

 

4. Download OTRS Community Edition on Rocky Linux 8 / AlmaLinux 8

The latest version while doing this article was ((OTRS)) Community Edition 6.0.32. You can get the latest version from the official web page.

Right-click on the ZIP button and Copy the link to use with wget command for downloading the file directly on your system using the terminal.

wget https://otrscommunityedition.com/download/otrs-community-edition-6.0.32.zip

Once you have the file, extract and move it to /opt directory to make sure we won’t delete it accidentally.

sudo mv  otrs-community-edition-*.zip /opt

 

5. Add dedicated user on Almalinux/Rocky for OTRS

Command to add a new user:

useradd otrs

Add OTRS to Apache group

usermod -G apache otrs

 

6. Install a few required modules by the OTRS ticketing system

There are a couple of Perl packages/modules required to extend the functions of OTRS. Hence to check what are those we can use a script available in the OTRS extracted folder.

perl /opt/otrs/bin/otrs.CheckModules.pl

Check required OTRS module

Several modules will be listed but all of them are not necessary, however, the ones that are listed as “required” and “optional – recommended”.

Well, to install them the command is also given in front of each module, you can go for that or use the given one to get the necessary ones.

sudo cpan Net::DNS Moo Date::Format DateTime Text::CSV_XS XML::Parser XML::LibXML JSON::XS
sudo cpan Crypt::PasswdMD5 CSS::Minifier CGI Template YAML::XS 
sudo cpan Crypt::Eksblowfish::Bcrypt

 

7. Activate Default Config File

There is already a pre-build configuration file in the OTRS directory, we just need to copy and rename it in the same directory.

sudo cp /opt/otrs/Kernel/Config.pm.dist /opt/otrs/Kernel/Config.pm

 

8. Check All the required OTRS modules are installed

perl -cw /opt/otrs/bin/cgi-bin/index.pl
perl -cw /opt/otrs/bin/cgi-bin/customer.pl
perl -cw /opt/otrs/bin/otrs.Console.pl

The outcome of all the above three commands should be without any error.

Confirm moudles availability

 

9. Set File permissions

Apply appropriate permissions to files:

cd /opt/otrs/bin/otrs.SetPermissions.pl

 

10. Create Apache Configuration file for OTRS

For this we also don’t need to add anything manually because there is a pre-built template in the OTRS directory to use as an Apache configuration file, hence we just need to link it to some newly created file, let’s say otrs_apache.conf

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

Restart Apache & Database servers:

sudo systemctl restart httpd
sudo systemctl restart mariadb

 

Installing /Setting up OTRS on AlmaLinux or Rocky Linux 8

Open any browser on the system that can access the Ip-address of the server where OTRS has been installed. Then point to:

http://you-server-ip-address/otrs/installer.pl

Note: you-server-ip-address with the real address.

Welcome Screen:

OTRS Community Edition install AlmaLinux 8 or Rocky Linux

Accept the license and continue

Accept License

Check Database Settings

Add the system root password and then click on the “Check database Settings” button to confirm there is no error in connecting to the database server.

Check Database Settings

Note the password and username of the created Database, if required.

MariaDB Database Check

Database setup for Open Ticket Request system

Add email and other details…

ALmaLinux or Rocky Linux Settings for OTRS If you want to use OTRS to send emails then perform the Mail Configuration otherwise, click on the “Skip this Step” button.

Mail Configuration

Once done you will get the Startup page link along with the Admin Username and Password to login OTRS Dashboard.

Username and login OTRS Almalinux

OTRS – Open Ticket Request System Dashboard

Open Ticket Request System Dashboard

 

OTRS Daemon is not running, create Systemd file

On your Dashboard, you will see a message that ” OTRS Daemon is not running“. To start  and Daemon & Crond services in the background create a Systemd file:

Create Service file:

sudo nano /etc/systemd/system/otrs.service

Paste the following lines:

[Unit]
Description=OTRS: Open-source Ticket Request System, Copyright (C) 2001-2016 OTRS AG
Documentation=https://otrs.github.io/doc/manual/admin/stable/en/html/
Requires=crond.service httpd.service mariadb.service 

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/opt/otrs/bin/otrs.Daemon.pl start
ExecStart=/opt/otrs/bin/Cron.sh start
ExecStop=/opt/otrs/bin/Cron.sh stop
ExecStop=/opt/otrs/bin/otrs.Daemon.pl stop
User=otrs
Group=apache

[Install]
WantedBy=multi-user.target

Reload Daemon:

sudo systemctl daemon-reload

Start and Enable the Service:

sudo systemctl start otrs
sudo systemctl enable otrs

Check status:

systemclt status otrs

OTRS Service Status

 

That’s it, done!! For any further reference see the official OTRS Documentation.

 

 

 

1 thought on “How to install OTRS on AlmaLinux 8 / Rocky Linux 8”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.