How to Install and Configure OTRS (Ticketing Tool) on CentOS 7 / RHEL 7

OTRS is a free and open source ticketing tool available for Linux like operating systems. OTRS stands for “Open Source Trouble Ticket System“. In opensource 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.

Install-OTRS-CentOS7-RHEL7

In this article we will demonstrate how to install and configure OTRS 6 (Community Edition) on a CentOS 7 & RHEL 7 System. To Install OTRS community edition on a Linux system we need one database server (MariaDB, MySQL & PostgreSQL), Web Server (Apache & Ngnix) and Perl modules.

Following are the recommended hardware and software requirements for OTRS 6

  • 8 GB RAM
  • 3 GHZ Xenon
  • 256 GB Disk space
  • Perl 5.16 or higher
  • Web Server (Apache 2 or NGINX)
  • Database (MariaDB, MySQL & PostgreSQL 9.2 or higher)

Details of my lab setup for OTRS 6

  • Minimal CentOS 7 Or RHEL 7 System
  • Hostname: otrs.linuxtechi.lan
  • IP Address: 192.168.1.30
  • RAM: 4 GB
  • vCPU: 2
  • Disk Space: 40 GB

Let’s jump into the OTRS 6 installations steps,

Step:1) Apply all system updates and reboot the system

Login to your CentOS 7 or RHEL 7 system and execute the beneath yum update command to apply all the system updates and then reboot it,

[[email protected] ~]# yum update && reboot

Note: Put SELinux in permissive mode, even OTRS official web site suggests to disable SELinux, execute the below command.

[[email protected] ~]# setenforce 0
[[email protected] ~]# sed -i --follow-symlinks 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/sysconfig/selinux

Step:2) Install Web Server (Apache) and Database Server (MariaDB)

Install Apache Web Server and MariaDB database server using the beneath yum command,

[[email protected] ~]# yum install httpd httpd-devel gcc mariadb-server -y

Start and enable the Apache Web service using below commands,

[[email protected] ~]# systemctl start httpd
[[email protected] ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[[email protected] ~]#

Update the following parameters under the [mysqld] directive in /etc/my.cnf file for OTRS

[[email protected] ~]# vi /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
max_allowed_packet=64M
query_cache_size=32M
innodb_log_file_size=256M
character-set-server=utf8
collation-server=utf8_unicode_ci

Save & exit the file

Start and enable the database (mysql) service using the beneath systemctl commands,

[[email protected] ~]# systemctl start mariadb
[[email protected] ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[[email protected] ~]#

Configure the 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

[[email protected] ~]# mysql_secure_installation

Output of above command should be something like below,

mysql-secure-installation-centos7-part1

mysql-secure-installation-centos7-part2

Step:3) Install Community Edition OTRS 6 using yum command

At time of writing of this article community edition of OTRS 6 is available, use the below yum command to install it from command line.

[[email protected] ~]# yum install https://ftp.otrs.org/pub/otrs/RPMS/rhel/7/otrs-6.0.17-01.noarch.rpm -y

Above command will also install the dependencies of OTRS 6 automatically,

Once the OTRS 6 package is installed successfully then restart apache web service,

[[email protected] ~]# systemctl restart httpd
[[email protected] ~]#

Step:4) Allow http & https ports in OS firewall

In case OS firewall is running and enabled on your system then execute the following firewall-cmd command to allow http (80) and https (443) port, else you can skip this step.

[[email protected] ~]# firewall-cmd --permanent --add-service=http
success
[[email protected] ~]# firewall-cmd --permanent --add-service=https
success
[[email protected] ~]# firewall-cmd --reload
success
[[email protected] ~]#

Step:5) Verify and install required perl modules for OTRS

OTRS to work properly, perl modules are required, to verify whether all required perl modules are installed or not run the below command

[[email protected] ~]# /opt/otrs/bin/otrs.CheckModules.pl

Output of above command would be something like below,

Perl-Modules-Check-OTRS-CentOS7

As we can see above there are number of perl modules which are not installed. So to proceed with installation first install the missing perl modules.

Some of the perl modules are not available in the default yum centos 7 / RHEL 7 repositories, so enable the epel repository using following yum command,

[[email protected] ~]# yum install epel-release -y

Now install the missing perl modules using the following yum command,

[[email protected] ~]# yum install "perl(Crypt::Eksblowfish::Bcrypt)" "perl(DBD::Pg)" "perl(Encode::HanExtra)" "perl(JSON::XS)" "perl(Mail::IMAPClient)" "perl(Authen::NTLM)" "perl(ModPerl::Util)" "perl(Text::CSV_XS)" "perl(YAML::XS)" -y

Re-run the command “/opt/otrs/bin/otrs.CheckModules.pl” to verify whether all the required perl modules are installed successfully or not.

[[email protected] ~]# /opt/otrs/bin/otrs.CheckModules.pl

OTRS-Perl-Modules-CentOS7

Step:5) Access OTRS 6 Web Installer GUI

Type the following URL in your web browser

http://<OTRS-Server-IP-Adrress>/otrs/installer.pl

In my case URL is  “http://192.168.1.30/otrs/installer.pl”

Install-OTRS-License-CentOS7

Click on Next …

In the Next Window, Accept the License

Install-OTRS-Accept-License

In the Next Step select the database you want to use for OTRS, so in my case I am selecting as “MySQL” and select option to create a new database for OTRS and then click on Next…

Database-Selection-OTRS-Installation-CentOS7

In the next window specify the root password of mariadb database server, host where mariadb is running and rest of the things installer will automatically pick like OTRS database name, user name and its password.

OTRS-Database MySQL-CentOS7

Click on Next to proceed further,

OTRS-Database-Successfully-CentOS7

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

Install-OTRS-System-Settings-CentOS7

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

OTRS-Configure-Mail-CentOS7

In Next window you will get message that OTRS has been installed successfully, OTRS Start Page URL, user name and its password.

OTRS-Installation-Finished-Message-CentOS7

Step:6) Access Your 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 “[email protected]” and password which is displayed in above step.

http://192.168.1.30/otrs/index.pl

Replace the IP address that suits to your environment.

OTRS-Login-Page-CentOS7

OTRS-Dashboard-CentOS7

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

[[email protected] ~]# su - otrs
[[email protected] ~]$ /opt/otrs/bin/otrs.Daemon.pl start
Manage the OTRS daemon process.
Daemon started
[[email protected] ~]$ /opt/otrs/bin/Cron.sh start
(using /opt/otrs) done
[[email protected] ~]$

Now refresh the page, “OTRS daemon not running” message should go away.

OTRS-Clean-Dashboard-CentOS7

This confirm that Community Edition OTRS 6 has been installed successfully, that’s all from this article, please do share your feedback and comments in the comments sections below.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *