OTRS, which stands for “Open Ticket Request System,” is a free, open-source, web-based ticketing system used by many companies to improve operations related to customer support, help desk, call center, etc. Written in Perl, OTRS offers a beautiful dashboard that helps customers to register and create a ticket via a web browser. If you are looking for an open-source ticketing system, then OTRS is the best choice for you.

In this post, we will show you how to install OTRS on Oracle Linux 8.

Step 1 – Install Required Packages

Before we start, you will need to install the EPEL repository and other dependencies on your system. You can install all those packages by running the following command:

dnf update -y
dnf install epel-release -y
dnf install gcc expat-devel procmail mod_perl perl perl-core -y

Step 2 – Install Apache and MariaDB

Next, you will need to install the Apache and MariaDB servers on your system. You can install both using the following command:

dnf install httpd mariadb-server mysql-devel -y

Once both packages are installed, start the Apache and MariaDB services and enable them to start during the system reboot:

systemctl start httpd mariadb
systemctl enable httpd mariadb

Next, edit the MariaDB configuration file:

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

Add the following lines inside the [mysqld] section:

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

Save and close the file, then restart the MariaDB service to apply the changes:

systemctl restart mariadb

Step 3 – Download and Install OTRS

First, create a dedicated user to run OTRS using the following command:

useradd otrs

Next, add the OTRS user to the Apache group using the following command:

usermod -G apache otrs

Next, download the latest version of OTRS using the following command:

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

Once OTRS is downloaded, unzip the downloaded file with the following command:

unzip otrs-community-edition-6.0.35.zip

Next, move the extracted directory to the /opt with the following command:

mv otrs-community-edition-6.0.35 /opt/otrs

Next, set proper ownership to the OTRS directory:

chown -R otrs:otrs /opt/otrs

Step 4 – Install Required Perl Modules for OTRS

Next, you will need to install several Perl modules to extend the OTRS functionality. You can check all necessary modules by running the following script:

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

This will list out all necessary and optional modules.

Now, run the following commands one by one to install all modules. Please note that this process will take a long time.

yum install "perl(DBD::mysql)" -y
yum install "perl(XML::LibXSLT)" -y
cpan Crypt::Eksblowfish::Bcrypt
cpan Date::Format
cpan DateTime
cpan DBD::ODBC
cpan DBD::Oracle
cpan DBD::Pg
cpan Encode::HanExtra
cpan JSON::XS
cpan Mail::IMAPClient
cpan Authen::SASL
cpan Authen::NTLM
cpan Moo
cpan Net::DNS
cpan Net::LDAP
cpan Template
cpan Template::Stash::XS
cpan Text::CSV_XS
cpan XML::LibXML
cpan XML::LibXSLT
cpan XML::Parser
cpan YAML::XS
cpan DBD::mysql

Next, rename the OTRS default configuration file using the following command:

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

Next, check all the required OTRS modules using the following command:

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

Next, set appropriate permissions using the following command:

perl /opt/otrs/bin/otrs.SetPermissions.pl

Step 5 – Configure Apache for OTRS

OTRS provides a pre-configured Apache virtual host configuration file. You can link it to the Apache configuration directory using the following command:

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

Next, restart the Apache and MariaDB services to apply the changes:

systemctl restart httpd
systemctl restart mariadb

Step 6 – Create a Systemd Service File for OTRS

Next, you will need to create a systemd service file for OTRS. You can create it using the following command:

nano /etc/systemd/system/otrs.service

Add 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

Save and close the file, then reload the systemd daemon to apply the changes:

systemctl daemon-reload

Next, start and enable the OTRS service using the following command:

systemctl start otrs
systemctl enable otrs

Step 7 – Access OTRS Web Interface

Now, open your web browser and access OTRS using the URL http://your-server-ip/otrs/installer.pl. You should see the following screen:
OTRS welcome page
Click on the Next button. You should see the License agreement screen:
OTRS license page
Click on the Accept license and continue button. You should see the database selection screen.
OTRS check database page
Select MySQL database and click on the Next button. You should see the database setting page:
OTRS database page
Provide the root username, leave the password field blank, and click on the Check database settings. You should see the following screen:
OTRS database checked
Click on the Next button to create a database and user. You should see the following screen:
OTRS database created
Click on the Next button. You should see the general configuration screen:
OTRS general configuration page
Provide all necessary configurations and click on the Next button. You should see the following screen:
OTRS smtp configuration page
Provide your SMTP configuration or click on the “Skip this Step” button. You should see the following screen:
OTRS installed page
Click on the Startup page link. You will be redirected to the OTRS login:

Provide your login credentials and click on the Login button. You should see the following page:
OTRS dashboard page
Now, open your command-line interface to restart the OTRS service.

systemctl restart otrs

Now, refresh the OTRS dashboard. You should see that the “OTRS daemon not running” error is gone.
OTRS dashboard page2

Conclusion

In this post, we explained how to install the OTRS ticketing system on Oracle Linux 8. You can now create your own online ticketing system using via the OTRS dashboard. Try it on dedicated hosting from Atlantic.Net!