Setup Help Desk System Using OTRS On CentOS 6.5

Introduction

OTRS, stands for Open source Ticket Request System, is a popular help desk software that can be used to assign tickets to incoming queries, and tracks further communications when needed. using OTRS, we can manage incoming inquiries, complaints, support requests, defect reports, and other communications.

In this tutorial, let us see how to install OTRS latest version on CentOS 6.5. Here, my testbox details are given below:

  • Operating System: CentOS 6.5 Minimal
  • IP Address: 192.168.1.2/24
  • Hostname: server.unixmen.local

Prerequisites

Before installing OTRS, we have to do couple of prerequisites first.

First, make sure you have configured the proper FQDN name in /etc/hosts file.

vi /etc/hosts

Set the hostname as shown below:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
 ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
 192.168.1.2     server.unixmen.local    server

Log off or restart the system to take effect the saved changes.

Install and enable EPEL repository.

Log in as root user and Install Mysql server using the following command:

yum install mysql-server

Start mysql service as shown below:

service mysqld start
chkconfig mysqld on

By default, Mysql root user is blank. So let us setup the root user password as shown below:

mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
 SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): -----> Press Enter
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

You already have a root password set, so you can safely answer 'n'.

Change the root password? [Y/n] y -----> Enter Y and press Enter
 New password: -----> Enter the new password
 Re-enter new password: -----> Enter password again
 Password updated successfully!
 Reloading privilege tables..
 ... Success!

By default, a MySQL installation has an anonymous user, allowing anyone
 to log into MySQL without having to have a user account created for
 them.  This is intended only for testing, and to make the installation
 go a bit smoother.  You should remove them before moving into a
 production environment.

Remove anonymous users? [Y/n] y -----> Press Enter
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
 ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y -----> Press Enter
 ... Success!

By default, MySQL comes with a database named 'test' that anyone can
 access.  This is also intended only for testing, and should be removed
 before moving into a production environment.

Remove test database and access to it? [Y/n] y -----> Press Enter
 - Dropping test database...
 ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist
 ... Failed!  Not critical, keep moving...
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
 will take effect immediately.

Reload privilege tables now? [Y/n] y -----> Press Enter
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MySQL
 installation should now be secure.

Thanks for using MySQL!

MySQL has been installed successfully with default options. In order to work properly with OTRS, we have to add the following directives into the my.cnf file.

Edit file /etc/my.cnf,

vi /etc/my.cnf

Add the following lines under the [mysqld] section:

max_allowed_packet=20M
query_cache_size=32M

Save and close the file.

Next, restart mysql service using the following command:

service mysqld restart

Next, Install httpd package with command:

yum install httpd

Start httpd service, and make it to start automatically on every reboot.

service httpd start
chkconfig httpd on

Edit file /etc/httpd/conf/httpd.conf,

cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak
vi /etc/httpd/conf/httpd.conf

Find the following lines and modify them as shown below:

ServerAdmin root@domain.com
ServerName [hostname or IP address]:80
Listen IP-address-of-the-server:80

Example:

ServerAdmin root@unixmen.local
ServerName 192.168.1.2:80
Listen 192.168.1.2:80

Save and close file. Restart httpd service.

service httpd restart
Adjust iptables to allow apache default port 80.

Edit file /etc/sysconfig/iptables,

vi /etc/sysconfig/iptables

Add the following line:

-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT

Then, restart iptables to take effect the saved changes using the following command:

service iptables restart

Disable SELinux, otherwise you will get the following error:

If you want to use the installer, set the Kernel/Config.pm writable for the webserver user!

To disable SELinux, Edit file /etc/sysconfig/selinux,

vi /etc/sysconfig/selinux

Set value to disabled.

SELINUX=disabled

After that, reboot the system.

Download OTRS

Go to the OTRS download page and download the latest version.

wget http://ftp.otrs.org/pub/otrs/RPMS/rhel/6/otrs-3.3.6-01.noarch.rpm

The above will download and save the OTRS rpm file in the current directory. Install it using command:

yum install otrs-3.3.6-01.noarch.rpm

The above command will install otrs package along with all required packages.

Finally, restart httpd service one more time after installing OTRS.

service httpd restart

During OTRS installation, keep attention on the installer. It will display the web installer URL for OTRS.

Look at the following screenshot.

root@server:~_001

Install Additional PERL modules

Before proceeding to configure OTRS, you should install additional perl modules. Run the following command to know the required modules by OTRS:

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

Sample output:

o Crypt::Eksblowfish::Bcrypt.......Not installed! (optional - For strong password hashing.)
 o Crypt::SSLeay....................ok (v0.57)
 o Date::Format.....................ok (v2.22)
 o DBI..............................ok (v1.609)
 o DBD::mysql.......................ok (v4.013)
 o DBD::ODBC........................Not installed! (optional - Required to connect to a MS-SQL database.)
 o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.)
 o DBD::Pg..........................Not installed! (optional - Required to connect to a PostgreSQL database.)
 o Encode::HanExtra.................Not installed! (optional - Required to handle mails with several Chinese character sets.)
 o GD...............................Not installed! (optional - Required for stats.)
 o GD::Text.......................Not installed! (optional - Required for stats.)
 o GD::Graph......................Not installed! (optional - Required for stats.)
 o IO::Socket::SSL..................ok (v1.31)
 o JSON::XS.........................Not installed! (optional - Recommended for faster AJAX/JavaScript handling.)
 o List::Util::XS...................ok (v1.21)
 o LWP::UserAgent...................ok (v6.05)
 o Mail::IMAPClient.................Not installed! (optional - Required for IMAP TLS connections.)
 o IO::Socket::SSL................ok (v1.31)
 o ModPerl::Util....................ok (v2.000004)
 o Net::DNS.........................ok (v0.65)
 o Net::LDAP........................ok (v0.40)
 o Net::SSL.........................ok (v2.84)
 o PDF::API2........................Not installed! (optional - Required for PDF output.)
 o Compress::Zlib.................ok (v2.021)
 o Text::CSV_XS.....................Not installed! (optional - Recommended for faster CSV handling.)
 o Time::HiRes......................ok (v1.9721)
 o XML::Parser......................ok (v2.36)
 o YAML::XS.........................Not installed! (required - Please install this module - )

As you see in the above output, some perl modules are missing. Install them all at once or one by one as shown below.

yum install "perl(Crypt::Eksblowfish::Bcrypt)" "perl(DBD::ODBC)" "perl(DBD::Oracle)" "perl(DBD::Pg)" "perl(Encode::HanExtra)" "perl(GD)" "perl(GD::Text)" "perl(GD::Graph)" "perl(JSON::XS)" "perl(Mail::IMAPClient)" "perl(PDF::API2)" "perl(Text::CSV_XS)" "perl(YAML::XS)"

Now, check again for any missing modules.

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

Sample output:

o Crypt::Eksblowfish::Bcrypt.......ok (v0.009)
 o Crypt::SSLeay....................ok (v0.57)
 o Date::Format.....................ok (v2.22)
 o DBI..............................ok (v1.609)
 o DBD::mysql.......................ok (v4.013)
 o DBD::ODBC........................ok (v1.48)
 o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.)
 o DBD::Pg..........................ok (v2.15.1)
 o Encode::HanExtra.................ok (v0.23)
 o GD...............................ok (v2.44)
 o GD::Text.......................ok (v0.86)
 o GD::Graph......................ok (v1.44)
 o IO::Socket::SSL..................ok (v1.31)
 o JSON::XS.........................ok (v2.27)
 o List::Util::XS...................ok (v1.21)
 o LWP::UserAgent...................ok (v6.05)
 o Mail::IMAPClient.................ok (v3.34)
 o IO::Socket::SSL................ok (v1.31)
 o ModPerl::Util....................ok (v2.000004)
 o Net::DNS.........................ok (v0.65)
 o Net::LDAP........................ok (v0.40)
 o Net::SSL.........................ok (v2.84)
 o PDF::API2........................ok (v2.019)
 o Compress::Zlib.................ok (v2.021)
 o Text::CSV_XS.....................ok (v0.85)
 o Time::HiRes......................ok (v1.9721)
 o XML::Parser......................ok (v2.36)
 o YAML::XS.........................ok (v0.38)

If everything seems good, proceed to web installer.

Begin OTRS Web installer

OTRS development team has made a simple way web based installer to make the installation lot easier.

Open up the web browser and navigate to http://ip-address/otrs/installer.pl.

The following screen will appear. Click Next to continue.

Install OTRS - Intro - OTRS - Mozilla Firefox_002Accept the License agreement.

Install OTRS - License - OTRS - Mozilla Firefox_003Select the database type. In my case, I select the MySQL database.

Install OTRS - Database Selection - OTRS - Mozilla Firefox_004Enter the MySQL root user name and password etc. Click Check database settings button.

Install OTRS - Database MySQL - OTRS - Mozilla Firefox_005Once you check the button “Check database settings”, a default database and user  will be automatically created. You can change these values as per your liking, or leave the default selection and click next to continue.

Install OTRS - Database MySQL - OTRS - Mozilla Firefox_006

Now the new database will be created. Click Next to continue.

Install OTRS-Create Database - OTRS - Mozilla Firefox_007Enter the administrator Email for OTRS, system FQDN, organization name etc. And, click Next.

Install OTRS - System Settings - OTRS - Mozilla Firefox_008Next, you’ll be prompted to enter the inbound and outbound mail settings. Also, You can setup this option later in the administration dashboard.

Install OTRS - Configure Mail - OTRS - Mozilla Firefox_009Congratulations! We have successfully implemented the OTRS system. Note down the the default username and password of the administrative account.

Install OTRS - Finished - OTRS - Mozilla Firefox_010As you see in the above screenshot, the installer shows you the the administrative login URL, default username and password.

Access OTRS dashboard

Navigate to http://ip-address/otrs/otrs/index.pl from your browser. Enter the default user name and password.

Login - OTRS - Mozilla Firefox_012This is how the OTRS administrative dashboard looks.

Dashboard - OTRS - Mozilla Firefox_013

After successful installation, we have to do some installation tasks. The first one is to start the scheduler. Click on the warning link that says: “Scheduler is not running” on the top.

Click Start Scheduler button.

Dashboard - OTRS - Mozilla Firefox_014

Next change the default password of the admin account(root@locahost) by clicking on the username on the upper top right corner.

Enter the current password, and enter the new password twice. Finally, click Update.

Preferences - OTRS - Mozilla Firefox_015

OTRS Administration

As you may know, working on OTRS with admin user is not recommended. So, create new users(agents).

Go to the Admin section on the top menu bar, and select Agents to create new user.

Admin - OTRS - Mozilla Firefox_016

Click on the Add Agent Link on the left.

Agents - Admin - OTRS - Mozilla Firefox_018Fill up the details such as first name, last name, password, and email id etc. Then, click Submit button.

Agents - Admin - OTRS - Mozilla Firefox_019

Next choose the group relations for the new agent. Then, click Submit button.

Agents --- Groups - Admin - OTRS - Mozilla Firefox_020The new agent will be created now.

Agents --- Groups - Admin - OTRS - Mozilla Firefox_022

By this way, you create more users(agents), groups, roles, customers etc from the Admin section.

Customer user:

Customer Users - Customers - OTRS - Mozilla Firefox_025

Create Tickets

Let us create a sample ticket, and assign this ticket to Agent sk. Navigate to Tickets -> New email ticket or Phone ticket.

Enter the customer user mail id, subject and body of the mail. Click on the Owner drop down box and select the Agent name. Finally, click Send mail. A new ticket will be created and assigned to the agent sk.

Sample Email ticket:

New email ticket - Ticket - OTRS - Mozilla Firefox_028Whenever, the agent sk, log in to the PTRS, he will see a ticket has been assigned to him in his dashboard.

Dashboard - OTRS - Mozilla Firefox_029The agent can see the full details of the new ticket by clicking on it.

2014040931000026 - Zoom - Ticket - OTRS - Mozilla Firefox_030

That’s it. For more details, look at the official documentation page.

Cheers!