In this tutorial, we will show you how to install and configuration OTRS on Ubuntu 16.04 LTS server. For those of you who didn’t know, OTRS (Open-Source Ticket Request System) is a web-based ticketing system, widely used by businesses for services like customer support, help desks, and call centers. The software is separated into several parts, the main section being the OTRS framework, which contains all central functions for the application and the ticket system
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation of OTRS on a Ubuntu 16.04 (Xenial Xerus) server.
Install OTRS on Ubuntu 16.04 LTS
Step 1. First, make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.
sudo apt-get update sudo apt-get upgrade
Step 2. Installing MariaDB.
Install MariaDB on the server using
sudo apt-get install mariadb-server
By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:
Configure it like this:
- Set root password? [Y/n] y - Remove anonymous users? [Y/n] y - Disallow root login remotely? [Y/n] y - Remove test database and access to it? [Y/n] y - Reload privilege tables now? [Y/n] y
Once installed, OTRS requires that you change the following settings:
Under the [mysqld] section, paste:
max_allowed_packet = 20M query_cache_size = 32M innodb_log_file_size = 256M
Start MariaDB with the system:
systemctl start mysql systemctl enable mysql
Step 3. Installing OTRS (OpenSource Trouble Ticket System).
The first thing to do is to go to OTRS’s download page and download the latest stable version of OTRS:
Unpack the OTRS archive to the document root directory on your server:
tar xpf otrs-5.0.16.tar.bz2 mv otrs-5.0.16 /opt/otrs
Check if the system contains all required PERL modules and install required modules with apt (as suggested by the script), executing the command:
Create an OTRS user:
useradd -d /opt/otrs -c 'OTRS user' otrs usermod -G www-data otrs
Default config files In
/opt/otrs, execute the following command:
cp Kernel/Config.pm.dist Kernel/Config.pm
Step 4. Configure Apache webserver.
Check installed modules and configure Apache:
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
If the response is “syntax OK” for all, it means that the Perl modules have been installed successfully.
Next, install the Apache webserver and mod_perl, using
apt-get install apache2 libapache2-mod-perl2
/opt/otrs there is a configuration file for Apache. Link it to the webserver configuration directory:
ln -s /opt/otrs/scripts/apache2-httpd.include.conf /etc/apache2/conf-enabled/zzz_otrs.conf
OTRS requires a few Apache modules to be active for optimal operation:
a2enmod perl a2enmod headers a2enmod version a2enmod deflate a2enmod filter
Finally, Restart the webserver so it will load new configurations:
systemctl restart apache2
We will need to change some folders permissions:
Step 5. Accessing OTRS.
OTRS will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://your-domain.com/otrs/installer.pl or http://server-ip/otrs/installer.pl and complete the required steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel.
Congratulations! You have successfully installed OTRS. Thanks for using this tutorial for installing OTRS (OpenSource Trouble Ticket System) on Ubuntu 16.04 Xenial Xerus server. For additional help or useful information, we recommend you to check the official OTRS website.