![](http://1.bp.blogspot.com/-WItT16r2aT4/XgX_tryYmZI/AAAAAAAASGM/Augj0WFgglEZAULkJVcsrtdZR62w6fPbQCLcBGAsYHQ/s1600/otrs_installer_pl-9.png)
Open source ticket request system also known a help desk and IT service management system. The program is written in Perl, supports a variety of databases including (MySQL, PostgreSQL, Oracle etc.), and can integrate with LDAP/Active directory for central authentication.
This tutorial will walk you through the steps to install OTRS Community Edition on an Ubuntu 19.10 server. This will help you to receive and process requests from your users and customers using both the web interface and email.
Prerequisites
To follow this guide, you will need one Ubuntu 19.10 server installed on (physical or virtual) machine having a non-root user with sudo privileges.
Installing Apache
First, you need to install Apache web server using Ubuntu's package manager like below:Installing Perl Modules
Because OTRS is written in Perl, it uses a number of Perl modules. Some modules are only needed for optional functionality, such as communication with other databases or handling mail with specific character sets; others are necessary for the program to work.
To install the missing modules, type or copy the following command and paste it on your Ubuntu terminal to install:
Installing MySQL
Now that you have your web server up and running, it is time to install MySQL database:Securing MySQL
When the installation is complete, run a simple security script that comes pre-installed with MySQL which will remove some dangerous defaults and lock down access to your database system. Start the interactive script by running:
Response to the following prompts on your Ubuntu server like below:To configure the root account to authenticate with a password, run the following command and be sure to change password to a strong password of your choice:
Type the following on your mysql prompt but make sure you change password:Downloading OTRS
OTRS is available in Ubuntu's package manager, but the official documentation suggests installing the most latest release from source.
Download the source archive with the wget command. For this guide, we will download current release 6.0.24; you can find the latest available version on the OTRS download page.
Now that you have OTRS and its dependencies installed on your server, you can configure OTRS to use Apache as web server and MySQL as database.
Configuring OTRS
In this section, we will create a system user for OTRS, and then configure Apache and MySQL server to work with OTRS.Create a user name otrs to run OTRS functions with the useradd command:
OTRS comes with a default config file /opt/otrs/Kernel/Config.pm.dist, you can activate this by copying it without the .dist filename extension:
Now run the otrs.SetPermissions.pl script. It will detect the correct user and group settings and set the file and directory permissions for OTRS.
Next, activate the Apache configuration file and make sure it is loaded after all other configurations. To do this, make a symbolic link with the zzz_ prefix:
OTRS requires a few Apache modules to be active for optimal operation. You can activate them via the tool a2enmod. Although some of these have already been enabled, it is a good idea to check them all:
These modules enable Apache to work with Perl, control HTTP headers, compress server output, and configure output content filters.Restart your Apache web server to apply new configurations:
Before you go to the next step and run the web installer, change some of the MySQL configuration settings. Open the MySQL configuration file in your preferred text editor:
For max_allowed_packet and innodb_log_file_size, change the values to 64M and 512M respectively, as highlighted in the following code block:
Save and close file when you are finished.
Restart MySQL service to take changes into effect:
Now run below script to verify if you are missing any module required to run otrs:
You will get the output similar to below which says all is well. If you see any missing module other than DBD::Oracle, you must install them before proceeding next step.
![](http://1.bp.blogspot.com/-aSxdJYLAg9g/XgXh_Ifbt7I/AAAAAAAASE4/wlPYvyineGYrEddoYIYcGe_LtQIgj9kQQCLcBGAsYHQ/s1600/otrs_CheckModules.png)
We do not need DBD::Oracle module as we are running MySQL database, so you can safely ignore it and move to next step.
Creating Database
In this step, we will create a database, user and password for OTRS like below:Type the following on mysql prompt but make sure you change password of your choice:
Connect to mysql prompt again to modify otrs database:
Type the following on mysql prompt:
Now restart MySQL service to take changes into effect:
Now edit /opt/otrs/Kernel/Config.pm file and update the following parameter with your otrs database user's password:
If you have kept the database and user name "otrs" then you will only need to update below parameter with your password. If your database and username is different than "otrs", you have to update database and user parameter as well.
Save and close file when you are finished.Now that you have created the database and configured Apache and MySQL to work with OTRS, you are ready to use the web installer.
Accessing Web Installer
Open up your preferred web browser and navigate to http://your_server_name/otrs/installer.pl or http://your_server_ip/otrs/installer.pl and you will see a welcome screen like below.
Click Next
![](http://1.bp.blogspot.com/-ZCG4SUIO_U4/XgXkBHttxpI/AAAAAAAASFo/ZYLKaO1QuLsTylxvqRrWV1_CwqEeg0H7QCLcBGAsYHQ/s1600/otrs_installer_pl.png)
![](http://1.bp.blogspot.com/-bLWpqdD4HDo/XgXj-W5mKVI/AAAAAAAASFI/Sk4b8VAA9yMls_floYYPR6wrw6OUcwSugCLcBGAsYHQ/s1600/otrs_installer_pl-1.png)
Type: MySQL
Install Type: Use and existing database for OTRS
Click Next
![](http://1.bp.blogspot.com/-uhfVNjYfAaQ/XgXj-Q-SLZI/AAAAAAAASFE/-xPJcnzXnT0OFDtR10OK-bcsuT0aSthxgCLcBGAsYHQ/s1600/otrs_installer_pl-2.png)
![](http://1.bp.blogspot.com/-r1PLU1W3F6U/XgXj-XtS8_I/AAAAAAAASFM/61sAyHySsvYacByyXjJjl4xR21aGZoFigCLcBGAsYHQ/s1600/otrs_installer_pl-3.png)
You will see Database check successful like below.
Click Next
![](http://1.bp.blogspot.com/-wSxuP-EKeoU/XgXj_JnPhJI/AAAAAAAASFQ/LznkwnpLJgcjlzGmO0abv6mbq5P59_uGgCLcBGAsYHQ/s1600/otrs_installer_pl-4.png)
It will take few moments and then you will see below screen.
Click Next
![](http://1.bp.blogspot.com/-V5ZPQC2baOQ/XgXj_n-R5uI/AAAAAAAASFU/16HCfirioQM7WcP7i9h1WYsYSOT1oX5TACLcBGAsYHQ/s1600/otrs_installer_pl-5.png)
Next, provide the following required system settings:
System FQDN
AdminEmail
Organization
Leave all other options at their default values:
Click Next.
![](http://1.bp.blogspot.com/-NZ6CLvD_r2U/XgXkAO9apHI/AAAAAAAASFY/bAY0DSLqxr86oMlEnc6TKOCOsVhGpmDHwCLcBGAsYHQ/s1600/otrs_installer_pl-6.png)
Now you will land on the Mail Configuration page. In order to be able to send and receive emails using otrs, you have to configure a mail account. You can safely skip this section if you want to configure it later.
![](http://1.bp.blogspot.com/-bIBpXVoOAyM/XgXkAUGqm2I/AAAAAAAASFc/gEKdDLWsEm4ABMAtFqxci32xHNfQZzNygCLcBGAsYHQ/s1600/otrs_installer_pl-7.png)
The OTRS installation is now complete; you will see a Finished page with a link to the admin panel after Start page, and the credentials of the OTRS super user after that. Make sure you write down the generated password for the root@localhost user and the URL for the Start page.
![](http://1.bp.blogspot.com/-E7bMsNRlWJk/XgXkAt_y_4I/AAAAAAAASFg/Is6j4XXN2Y4p6PcAwzmDD225N4F1CtLswCLcBGAsYHQ/s1600/otrs_installer_pl-8.png)
The only thing left after a successful installation is to start the OTRS daemon and activate its cronjob.
Bring up the terminal you are using to access your Ubuntu 19.10 server. The OTRS daemon is responsible for handling any asynchronous and recurring tasks in OTRS.
Start it with the otrs user:
You will see the following output:There are two default cron files in the /opt/otrs/var/cron/ directory. Move into this directory.
These cron files are used to make sure that the OTRS daemon is running. Activate them by copying them without the .dist filename extension.
To schedule these cron jobs, use the script Cron.sh with the otrs user:
Next, we will log in to the administrator web interface by navigating https://your_server_name/otrs/index.pl or https://your_server_ip/otrs/index.pl and perform the below tasks.
Securing OTRS
Now that you have a fully functional OTRS, but it's not secure to use the super user account. We'll create a new agent. In OTRS, agents are users who have rights to the various functions of the system. In this example, we will use a single agent who has access to all functions of the system.
![](http://1.bp.blogspot.com/-X8WH2Stg1NY/XgXkA4XYX6I/AAAAAAAASFk/0LwNqbxCpRMDJwNWvbuqo4V-kR1j-oPYACLcBGAsYHQ/s1600/otrs_installer_pl-9.png)
![](http://1.bp.blogspot.com/-Ri3aO9BMeEg/XgXq1jceEeI/AAAAAAAASGA/aS7kikZsOlIlUtDCDF5SttQdX19s-dhkgCLcBGAsYHQ/s1600/otrs_dashboard.png)
First, we will create a new agent.
To do this, follow the link by clicking on the red message in the top of the screen that reads Don't use the Superuser account to work with OTRS 6! Create new Agents and work with these accounts instead. This will bring you to the Agent Management screen.
![](http://1.bp.blogspot.com/-7rugYtj3Qbo/XRe9Q3l-gpI/AAAAAAAARjk/GI9dxS6k9DsWOz6gKBXn8N-Nzm7oyEiGgCLcBGAs/s1600/OTRS_Agent_Management.png)
Click the Add agent button. This will bring you to the Add Agent screen. Most of the default options are fine. Fill in the first name, last name, username, password, and email fields. Record the username and password for future login. Submit the form by clicking the Save button.
Next, change the group relations for the new agent. Because your agent will also be the administrator, you can give it full read and write access to all groups. To do this, click the checkbox next to RW all the way on the right, under Change Group Relations for Agent.
![](http://1.bp.blogspot.com/-S8nwXXC6GXw/XRe9a7GybaI/AAAAAAAARjs/hG2nsY9fqAkYwtC5CgWvA15v8aH4TgXIgCLcBGAs/s1600/OTRS_Change_Group_Relations.png)
Finally, click Save and finish.
Now, log out and log back in again using the newly created account. You can find the Logout link by clicking on the avatar picture in the top left corner.
![](http://1.bp.blogspot.com/-nHSsHopPkB4/XRe9n_Z7gLI/AAAAAAAARj0/CFkeRvSnwGYqK2w0J968KvYjKBiTY4XkQCLcBGAs/s1600/OTRS_Logout_Location.png)
Once you have logged back in, you can customize your agent's preferences by clicking on Personal preferences in the avatar menu. There you can change your password, choose the interface language, configure setup notifications and favorite queues, change interface skins, etc.
Once you have logged in as your new agent and configured the account to your liking, the next step is to configure the inbound mail options to generate tickets from incoming emails.
Configuring OTRS Inbound Mail
Customers have two ways to forward new tickets to OTRS: via the customer front-end or by sending an email. In order to receive customer's messages you need to set up a POP or IMAP account. We will use a Gmail account as an example for OTRS configuration.Navigate to the Admin tab by clicking on Admin in the top menu. Then find the PostMaster Mail Accounts option and click on it. Press the Add Mail Account button to set up a new mailbox.
![](http://1.bp.blogspot.com/-s3ua8r6wHhc/XRe9v44VP8I/AAAAAAAARj8/0Yq-5-ktiZ0h9sHJ6qcS-HxxGeHh_iMEACLcBGAs/s1600/OTRS_Add_Mail_Account.png)
On the Add Mail Account screen, select IMAPS for Type. For Username, type in your email address, and Password. Leave all other options as default. Click Save.
Next, send a test email from an external email account to your dedicated OTRS email account. The mail will be fetched every 10 minutes by the OTRS daemon, but you can force receipt by clicking the Fetch mail link.
As a result, you will see the new ticket.
![](http://1.bp.blogspot.com/-U4uIMV2C7A8/XRe92zDQt7I/AAAAAAAARkA/OtsJVmaiWH85Me78WkBTxzBtwkbfB1X2wCLcBGAs/s1600/OTRS_Email_Ticket.png)
Now you are ready to accept tickets from customers via email. Next, you will go through the process of creating a ticket through the customer front-end.
Configuring OTRS Customer Interface
The second way for a customer to create a ticket is through the OTRS front-end. In this step, you will walk through this process to make sure this ticket creation method is set up.The customer front-end is located at http://your_server_name/otrs/customer.pl or http://your_server_ip/otrs/customer.pl. Navigate to it in a web browser. You can create a customer account there and submit a ticket using the GUI.
Use the Sign up now link to open the registration form and fill out the below form and press the Create button.
![](http://1.bp.blogspot.com/-d57qAlWXdBo/XRe-eZdphKI/AAAAAAAARkU/4Rgjo_Dgdy4aQj8Cf-quPpzs7DE0aa9ZwCLcBGAs/s1600/OTRS_Create_Account.png)
You will see a message like this:
New account created. Sent login information to username@youremail.com. Please check your email.
Check your inbox for the message from the OTRS. You will see a message with the new account credentials:
Hi example,
You or someone impersonating you has created a new OTRS account for
you.
Full name: example
User name: example@youremail.com
Password : user_password
You can log in via the following URL. We encourage you to change your password via the Preferences button after logging in.
http://your_server_name/otrs/customer.pl or http://your_server_ip/otrs/customer.pl
Now, use the provided credentials to access the customer front-end and create another ticket. All new tickets created using the customer front-end will immediately appear on the agent's dashboard:
![](http://1.bp.blogspot.com/-acEzbG8vgMU/XRe-z57PtzI/AAAAAAAARkc/mhRvLoG9McMgBSgMh4pUN-0MoALIzEDtwCLcBGAs/s1600/OTRS_Customer_Ticket.png)
On the agent dashboard, you can see the information on all current tickets: their status (new, opened, escalated, etc.), their age (the time elapsed from the moment when the ticket was received), and subject.
You can click on the ticket number (in the TICKET# column) to view its details. The agent can also take actions on the ticket here, like changing its priority or state, moving it to another queue, closing it, or adding a note.
You have now successfully set up your OTRS account.
Wrapping up
In this guide, you have installed and configured OTRS and created test help desk tickets. Now you can accept and process requests from your users and customers using both the web interface and email.