OTRS, or Open Source Ticket Request System, is open source ticketing software for customer service, help desk, and IT service management. The software is written in Perl and javascript. This is a trouble ticket solution for companies and organizations that need to manage tickets, complaints, support requests, or other types of reports. OTRS supports multiple database systems including MySQL, PostgreSQL, Oracle, and SQL Server, and it is a multi-platform software that can be installed on Windows and Linux.
In this tutorial, I will explain how to install and configure OTRS on Ubuntu 16.04. I will be using PostgreSQL as the database for OTRS and Apache web server as the web server.
prerequisites
In the first step, we will install the Apache web server as well as PostgreSQL. We will use the latest version from the ubuntu repository.
Use SSH to log in to your Ubuntu server:
1 |
|
Update Ubuntu repository.
1 |
|
Use apt to install Apache2 and PostgreSQL:
1 |
|
Make sure Apache and PostgreSQL are running by checking the server port.
1 |
|
You can see that port 80 is used by apache and port 5432 is used by the postgresql database.
OTRS is based on Perl, so we need to install some Perl modules required by OTRS.
Use this apt command to install the perl module:
1 |
|
After the installation is complete, we need to activate the Perl module for apache, and then restart the apache service.
1 2 |
|
Next, use the following command to check whether the module has been loaded:
1 |
|
OTRS is a web-based program and runs under the apache web server. To be safe, we need to run it as a normal user, not root.
Use the useradd command to create a new otrs user:
1 |
|
Next, add the otrs user to the www-data user group, because apache runs under the www-data user and user group.
1 |
|
There is already an otrs user in the /etc/passwd file.
1 |
|
A new user for OTRS has been created.
In this section, we will create a new PostgreSQL database for the OTRS system and make some minor changes to the configuration of the PostgreSQL database.
Log in to the postgres user and access the PostgreSQL shell.
1 2 |
|
Create a new role otrs with the password myotrspw and an unprivileged user.
1 |
|
Then create a new otrs database using otrs user permissions:
1 2 |
|
Next edit the PostgreSQL configuration file for otrs role verification.
1 |
|
Paste the following configuration after line 84:
1 2 |
|
Save the file and exit vim
Use exit to return to root privileges and restart PostgreSQL:
1 2 |
|
PostgreSQL is ready for OTRS installation.
In this tutorial, we will use the latest version from the OTRS website.
Enter the /opt directory and use the wget command to download OTRS 5.0:
1 2 |
|
Expand the otrs file, rename the directory and change the ownership of all otrs files and directories to otrs.
1 2 3 |
|
Next, we need to check the system and ensure that OTRS can be installed.
Use the following otrs script command to check the system packages required for OTRS installation:
1 |
|
Make sure all the results are correct, which means our server can install OTRS.
OTRS has been downloaded and our server is ready to install OTRS.
Next, enter the otrs directory and copy the configuration file.
1 2 |
|
Use vim to edit the Config.pm file:
1 |
|
Change the database password for row 42:
1 |
|
Comment 45 lines of MySQL database support:
1 |
|
Uncomment line 49 for PostgreSQL database support:
1 |
|
Save the file and exit vim.
Then edit the apache startup file to enable PostgreSQL support.
1 |
|
Uncomment lines 60 and 61:
1 2 3 |
|
Save the file and exit the editor.
Finally, check for missing dependencies and modules.
1 2 3 |
|
You can see in the screenshot below that the result is "OK":
In this tutorial, we will use the sample database, which can be found in the scripts directory. So we just need to import all the sample database and table structure into the database created in step 4.
Log in to the postgres user and enter the otrs directory.
1 2 |
|
As the otrs user, use the psql command to insert the database and table structure.
1 2 3 |
|
Enter the database password myotrspw when needed.
Set the file and directory permissions of otrs to the www-data user and user group.
1 |
|
Enable otrs apache configuration by creating a new link file into the apache virtual host directory.
1 |
|
Enable otrs virtual host and restart apache.
1 2 |
|
Make sure apache starts without errors.
OTRS has been installed and running in the Apache web server, but we still need to configure the OTRS scheduled task.
Log in to the otrs user, and then enter the var/cron directory as the otrs user.
1 2 3 |
|
Use the following command to copy all .dist scheduled task scripts:
1 |
|
Use exit to return to root permissions, and use the otrs user to start the scheduled task script.
1 2 |
|
Next, create a new scheduled task for PostMaster to manually collect emails. I will configure it to receive emails every 2 minutes.
1 2 |
|
Paste the following configuration:
1 |
|
Save and exit.
Now stop the otrs daemon and start it again.
1 2 |
|
OTRS installation and configuration are complete.
Open your web browser and enter your server IP address: http://192.168.33.14/otrs/
Use the default user root@localhost and password root to log in.
Using the default root account you will see a warning. Click on the warning message to create a new admin root user.
The following is the admin page that appears after logging in with another admin root user. There is no error message here.
If you want to log in as a customer, you can use customer.pl: http://192.168.33.14/otrs/customer.pl
You will see the customer login interface, enter the customer's username and password.
The following is a customer page to create a new document.
If you still see the "OTRS Daemon is not running" error, you can debug the OTRS daemon process like this.
1 2 |
|
Stop the OTRS daemon:
1 |
|
Use the --debug option to start the OTRS daemon.
1 |
|
The above is the detailed content of Tips for installing OTRS on Ubuntu 16.04. For more information, please follow other related articles on the PHP Chinese website!