
Step-by-Step Guide: Installing OTRS Ticket System on Debian 11 (Bullseye)
Deploying a robust, open-source help desk solution is a game-changer for managing customer support, IT requests, and internal workflows. OTRS (Open-source Ticket Request System) has long been a trusted choice for organizations needing a powerful and customizable ticketing platform.
This comprehensive guide will walk you through the entire process of installing the OTRS 6 Community Edition on a fresh Debian 11 (Bullseye) server. By following these steps, you will have a fully functional help desk system ready for configuration.
Prerequisites
Before we begin, ensure you have the following:
- A server running a clean installation of Debian 11.
- Root or
sudo
access to the server. - A static IP address configured on your server.
Let’s get started.
Step 1: Update Your System
First, it’s essential to ensure your system’s package lists and installed packages are up to date. This prevents potential conflicts and security vulnerabilities.
Open your terminal and run the following commands:
sudo apt update
sudo apt upgrade -y
Step 2: Install Apache and MariaDB
OTRS relies on a web server and a database to function. We will use Apache2 as our web server and MariaDB as our database server, both of which are highly stable and well-supported on Debian.
Install them with a single command:
sudo apt install apache2 mariadb-server -y
Once the installation is complete, start and enable the services to ensure they launch automatically on boot:
sudo systemctl start apache2
sudo systemctl enable apache2
sudo systemctl start mariadb
sudo systemctl enable mariadb
Step 3: Secure Your MariaDB Installation
A fresh MariaDB installation comes with default settings that are not secure for a production environment. This is a critical security step. Run the included security script to set a root password, remove anonymous users, and enhance overall database security.
sudo mysql_secure_installation
Follow the on-screen prompts. It is highly recommended to:
- Set a strong root password.
- Remove anonymous users.
- Disallow root login remotely.
- Remove the test database.
- Reload privilege tables.
Step 4: Create the OTRS Database and User
OTRS requires its own dedicated database and a user with specific permissions to access it. Log in to the MariaDB shell as the root user you just configured.
sudo mysql -u root -p
Enter the root password when prompted. Now, execute the following SQL commands to create the database, the user, and grant the necessary privileges.
Remember to replace YourStrongPassword
with a unique, secure password.
CREATE DATABASE otrs CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'otrs'@'localhost' IDENTIFIED BY 'YourStrongPassword';
GRANT ALL PRIVILEGES ON otrs.* TO 'otrs'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 5: Install Required Perl Modules
OTRS is built on the Perl programming language and depends on numerous Perl modules. You can install most of them directly from the Debian repositories.
Run this command to install all the necessary modules:
sudo apt install libapache2-mod-perl2 libdbd-mysql-perl libtimedate-perl libnet-dns-perl libnet-ldap-perl libio-socket-ssl-perl libpdf-api2-perl libsoap-lite-perl libtext-csv-xs-perl libjson-xs-perl libapache-dbi-perl libxml-libxml-perl libxml-libxslt-perl libyaml-perl libarchive-zip-perl libcrypt-eksblowfish-perl libencode-hanextra-perl libmail-imapclient-perl libtemplate-perl -y
Step 6: Download and Set Up OTRS
At this stage, we will download the OTRS source code, create a dedicated system user, and place the files in the correct directory.
Create an OTRS User: This user will run the OTRS processes, which is a good security practice.
sudo useradd -d /opt/otrs -c 'OTRS user' otrs sudo usermod -aG www-data otrs
Download OTRS: Navigate to the
/tmp
directory and download the latest OTRS 6 archive.cd /tmp wget http://ftp.otrs.org/pub/otrs/otrs-6.0.30.tar.gz
Extract and Move OTRS: Unpack the archive and move its contents to the standard
/opt/otrs
directory.tar -xvf otrs-6.0.30.tar.gz sudo mv otrs-6.0.30 /opt/otrs
Step 7: Configure OTRS
Now we need to configure OTRS by copying its default configuration file, checking for module dependencies, and setting the correct file permissions.
Copy the Configuration File:
sudo cp /opt/otrs/Kernel/Config.pm.dist /opt/otrs/Kernel/Config.pm
Check for Missing Modules: OTRS includes a helpful script to verify that all required Perl modules are installed.
sudo /opt/otrs/bin/otrs.CheckModules.pl
If any modules are listed as “Not installed,” you can typically find and install them using
apt install
orcpan
. Our installation command in Step 5 should have covered them all.Set File Permissions: Run the permissions script to ensure the web server and OTRS user can access the necessary files.
sudo /opt/otrs/bin/otrs.SetPermissions.pl
Step 8: Configure Apache for OTRS
To make OTRS accessible via the web, we need to tell Apache how to handle it.
Link the OTRS Apache Configuration:
sudo ln -s /opt/otrs/scripts/apache2-httpd.include.conf /etc/apache2/sites-enabled/otrs.conf
Enable Required Apache Modules: OTRS needs several Apache modules to function correctly.
sudo a2enmod perl sudo a2enmod deflate sudo a2enmod filter sudo a2enmod headers sudo a2enmod rewrite
Restart Apache: Apply all the changes by restarting the Apache service.
sudo systemctl restart apache2
Step 9: Run the Web-Based Installer
The command-line setup is complete. The final configuration steps are handled through a user-friendly web installer.
Open your web browser and navigate to: http://your-server-ip/otrs/installer.pl
Follow the on-screen instructions:
- Click “Next” on the welcome screen.
- Accept the GNU General Public License.
- On the database configuration screen, select MySQL and enter the database details you created in Step 4 (Database:
otrs
, User:otrs
, Password:YourStrongPassword
). - The installer will verify the connection and create the necessary tables.
- Enter your system settings, such as the system FQDN and administrator email address.
- Once complete, you will be given a randomly generated password for the
root@localhost
user. Save this password securely.
Step 10: Final Post-Installation Steps
A few final tasks are required to get OTRS running smoothly.
Start the OTRS Daemon and Scheduler:
sudo su - otrs -c "/opt/otrs/bin/otrs.Daemon.pl start" sudo su - otrs -c "/opt/otrs/bin/Cron.sh start"
Security Cleanup: For security reasons, it is crucial to remove the installer file now that the setup is finished.
sudo rm /opt/otrs/Installer.pl
You can now log in to your OTRS system at http://your-server-ip/otrs/index.pl
using the username root@localhost
and the password provided at the end of the web installation.
Congratulations! You have successfully installed a powerful OTRS ticketing system on your Debian 11 server. Your next steps will be to configure mail accounts, user roles, queues, and service level agreements to tailor the system to your organization’s needs.
Source: https://kifarunix.com/install-otrs-ticketting-system-on-debian/