Installing OTRS Help Desk and ITSM software on CentOS 7

Updated on 10th November 2017

OTRS (Open source TRouble ticket System) is one of the most popular open source software used for help desk and IT Service Management. You can download, install, modify and use OTRS completely free of cost as it is licensed under the Affero General Public License V3 (AGPL). This article helps you with step-by-step instruction on how to install OTRS software on CentOS 7 Operating system.

Prerequisite

To follow this tutorial, you should already have CentOS 7 installed on a physical or virtual machine. Hardware requirements for OTRS depends on the sizing of your system but the recommended requirements for a small setup (with OTRS version 5) is a machine with very with at least a 3 GHz Xeon or comparable CPU, 8 GB RAM, and a 256 GB hard drive for a small setup.

Step 1: Update your system

Before you begin, update all installed packages in your system with the latest version available. Login to the system as root user and run the following command:

# yum update

Step 2: Setup and configure database

OTRS requires MySQL(or MariaDB), PostgresSQL or Oracle database in the backend. You can install the database in the same machine that runs OTRS or you can install it in a separate database server.

For the purpose of this tutorial we will install MariaDB database which is currently the most popular backend for OTRS installation. Run the following commands to install configure MariaDB database for OTRS.

Install MariaDB database

# yum install mariadb-server

You need to tweak some of the default configurations in MariaDB to make it work with OTRS. Create a file in /etc/my.cnf.d/ directory with the following contents.

vi /etc/my.cnf.d/myotrs.cnf
[mysqld]
max_allowed_packet   = 20M
query_cache_size     = 32M
innodb_log_file_size = 256M

Alternatively you could add this directly in the /etc/my.cnf file under the [mysqld] section.

Enable the database service to start automatically on boot.

# systemctl enable mariadb

Start the MariaDB database service

# systemctl start mariadb

Step 3: Install and start the web server

OTRS needs Apache2 web server. Below are the commands to install and run Apache2 web server.

# yum install httpd
# systemctl enable httpd
# systemctl start httpd

Step 4: Configure firewall to allow webserver traffic

By default CentOS 7 will block all http and https traffic. We need to allow this traffic to be able to access the OTRS website from a remote system. Below are the commands:

# firewall-cmd --add-service=http --permanent 
# firewall-cmd --add-service=https --permanent
# systemctl restart firewalld

Step 5: Disable SELinux

OTRS won't work if you have SELinux enabled on your system. To check the status of SELinux, run:

# sestatus
SELinux status: enabled
...

To disable SELinux edit the file /etc/selinux/config and set SELINUX=disabled

vi /etc/selinux/config
....
SELINUX=disabled
...

Save and exit the file. Then reboot the system for the changes to take effect.

# reboot

After reboot verify SELinux status is disabled.

# sestatus
SELinux status:  disabled

Step 6: Download and Install OTRS

Download OTRS rpm file from the OTRS Portal website. Copy it to a suitable folder and the run the following command from that folder location after substituting the RPM file name with the one that you downloaded.

# yum install otrs-5.0.23-01.noarch.rpm

Restart Apache web server to load the configuration for OTRS.

systemctl restart httpd

Step 7: Check and install additional Perl Modules

OTRS requires several Perl Modules which may not already be installed in your system. Run the below command to check which modules need to be installed.

# /opt/otrs/bin/otrs.CheckModules.pl

To install additional packages with yum :

# yum install httpd-devel
# yum install gcc
# yum install perl-YAML
# yum install perl-Encode-devel
# yum install perl-CPAN

You can install the missing Perl Modules using CPAN :

# perl -MCPAN -e shell;
cpan[1]> install YAML::XS
cpan[2]> install Text::CSV_XS
cpan[3]> install ModPerl::Util
cpan[4]> install Authen::NTLM
cpan[5]> install Mail::IMAPClient
cpan[6]> install JSON::XS
cpan[7]> install Encode::HanExtra
cpan[8]> install DBD::mysql
cpan[9]> install Crypt::Eksblowfish::Bcrypt

Finally you can check if all necessary modules are installed using the commands below:

# perl -cw /opt/otrs/bin/cgi-bin/installer.pl
/opt/otrs/bin/cgi-bin/installer.pl syntax OK
# perl -cw /opt/otrs/bin/cgi-bin/index.pl
/opt/otrs/bin/cgi-bin/index.pl syntax OK
# perl -cw /opt/otrs/bin/cgi-bin/customer.pl
/opt/otrs/bin/cgi-bin/customer.pl syntax OK
# perl -cw /opt/otrs/bin/otrs.Console.pl
/opt/otrs/bin/otrs.Console.pl syntax OK

Step 8: Setup and Configure OTRS

After the installation of the OTRS software and all the required modules are complete, you can start configuring OTRS database, email and other settings using the web installer. To start the web installer, open the below URL in a web browser:

http://localhost/otrs/installer.pl 

Click Next on the Welcome screen.

Welcome Screen
OTRS Welcome Screen

Click Accept License and Continue in License page.

License Agreement
License Agreement

In the database settings screen select Type → MySQL and Install Type → Create a new database for OTRS.

Database Selection
Database Selection

Enter the Database Credentials and click Check Database settings and you should see the message Database check successful.

Now you can enter a name for the OTRS database, database user name and password, then click Next.

Configure MySQL
Configure MySQL

Click Next when the database creation is completed.

Create Database
Create Database

In the System settings screen enter your Company name, email, language etc., and click Next.

System Settings
System Settings

The next screen allows you to configure Mail server settings. Input you mail server details and click Check Mail Configuration. You may skip this step for now if you haven't setup your mail server yet.

Mail Configuration
Mail Configuration

That's it!!..Your installation is now complete. Take note of the auto generated password for super user account root@localhost

Setup Completed
Setup Completed

Step 9: Start OTRS daemon and watchdog

Login as otrs user and start the daemon and watchdog.

# su - otrs
# /opt/otrs/bin/otrs.Daemon.pl start
# /opt/otrs/bin/Cron.sh start

Step 10: Install OTRS ITSM

OTRS ITSM is an open source ITIL compliant IT Service management solution that is built on top of OTRS core framework that consists of the ticketing system. There are different modules with in ITSM such as Incident managent, service level management and change and configuration management. You can install these modules seperately by signing in as an administrator and click on Admin tab then select Package Manager under System Administration section.

Package Manager
OTRS Package Manager

You can install the ITSM packages from the online repository or download the packages from the OTRS Portal then click Browse to select the downloaded package (.opm) file and click Install Pacakge.

First of all you should install the GeneralCatalog package and then the ITSMCore package before installing any ITSM module that you need.

What next?

Open a web browser and go to the URL:

http://localhost/otrs/index.pl

Login using username root@localhost and the password that you saved earlier. You can then start customizing OTRS to suit your requirements. Enjoy!!


Post a comment

Comments

Nothing yet..be the first to share wisdom.