Share your love
Install OTRS Community Edition on Debian 11 with Easy Steps

This guide intends to teach you to Install OTRS Community Edition on Debian 11. OTRS Community Edition is a Ticket Request System (trouble ticket system) with many features to manage customer telephone calls and e-mails. The system is built to allow your support, sales, pre-sales, billing, internal IT, helpdesk, etc. department to react quickly to inbound inquiries.
Now follow the guide steps below on the Orcacore website to start the OTRS Ticket System Setup on Debian 11.
Table of Contents
Steps To Install OTRS Community Edition on Debian 11
To set up the OTRS Ticket System, log in to your server as a non-root user with sudo privileges and set up a basic firewall. To do this, you can follow our guide on Initial Server Setup with Debian 11.
1. Install Required Packages For OTRS Ticket System
First, you need to update your local package index with the following command:
sudo apt update
Then, use the following command to install the required build tools on your Debian 11:
sudo apt install perl libapache2-mod-perl2 libdbd-mysql-perl libtimedate-perl \
libnet-dns-perl libnet-ldap-perl libio-socket-ssl-perl libpdf-api2-perl \
libdbd-mysql-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 libmoo-perl libauthen-ntlm-perl \
libjavascript-minifier-xs-perl libdbd-odbc-perl libcss-minifier-xs-perl \
libdbd-pg-perl libdatetime-perl apache2 mariadb-server mariadb-client -y
2. Download OTRS Community Edition on Debian 11
At this point, you need to create an OTRS system user account by using the command below:
sudo useradd -r -m -d /opt/otrs -c "OTRS User" -s /usr/sbin/nologin otrs
Then, visit the OTRS Community Edition Downloads page and get the latest package by using the wget command and extract it in the /opt/otrs directory:
# sudo wget https://otrscommunityedition.com/download/otrs-community-edition-6.0.39.tar.gz
# sudo tar xvfz otrs-community-edition-6.0.39.tar.gz -C /opt/otrs --strip-components=1
Next, run the OTRS Perl script on Debian 11 to check if all required modules are in place:
sudo perl /opt/otrs/bin/otrs.CheckModules.pl
Output
o Apache::DBI......................ok (v1.12)
o Apache2::Reload..................ok (v0.13)
o Archive::Tar.....................ok (v2.36)
o Archive::Zip.....................ok (v1.68)
o Crypt::Eksblowfish::Bcrypt.......ok (v0.009)
o CSS::Minifier::XS................ok (v0.11)
o Date::Format.....................ok (v2.24)
o DateTime.........................ok (v1.54)
o DateTime::TimeZone.............ok (v2.47)
o DBI..............................ok (v1.643)
o DBD::mysql.......................ok (v4.050)
o DBD::ODBC........................ok (v1.61)
o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.)
o DBD::Pg..........................ok (v3.14.2)
o Digest::SHA......................ok (v6.02)
o Encode::HanExtra.................ok (v0.23)
o IO::Socket::SSL..................ok (v2.069)
o JSON::XS.........................ok (v4.03)
o JavaScript::Minifier::XS.........ok (v0.13)
o List::Util::XS...................ok (v1.55)
o LWP::UserAgent...................ok (v6.64)
o Mail::IMAPClient.................ok (v3.42)
o IO::Socket::SSL................ok (v2.069)
o Authen::SASL...................ok (v2.16)
o Authen::NTLM...................ok (v1.09)
o ModPerl::Util....................ok (v2.000011)
o Moo..............................ok (v2.004004)
o Net::DNS.........................ok (v1.29)
o Net::LDAP........................ok (v0.68)
o Net::SMTP........................ok (v3.11)
o Template.........................ok (v2.27)
o Template::Stash::XS..............ok (undef)
o Text::CSV_XS.....................ok (v1.45)
o Time::HiRes......................ok (v1.9764)
o Unicode::Collate.................ok (v1.27)
o XML::LibXML......................ok (v2.0134)
o XML::LibXSLT.....................ok (v1.99)
o XML::Parser......................ok (v2.46)
o YAML::XS.........................ok (v0.82)
Note: If any Perl module is missing, install them using the package manager.
3. Activate Default OTRS Configuration
At this point, you need to activate the default OTRS configuration, /opt/otrs/Kernel/Config.pm.dist, by renaming it to remove the .dist extension. To do this, run the following command:
sudo cp /opt/otrs/Kernel/Config.pm{.dist,}
When you are done, check other required modules are ok by using the following command:
# sudo perl -cw /opt/otrs/bin/cgi-bin/index.pl
# sudo perl -cw /opt/otrs/bin/cgi-bin/customer.pl
# sudo perl -cw /opt/otrs/bin/otrs.Console.pl
# sudo perl /opt/otrs/bin/otrs.SetPermissions.pl
4. Create OTRS Database User on Debian 11
At this point, you need to run the MySQL security script:
sudo mysql_secure_installation
Set a password for your MariaDB and answer the question by entering the y.
Enter current password for root (enter for none):
Set root password? [Y/n]: Y
Enter Password:
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
Then, log in to your MariaDB shell with the following command
sudo mysql -u root -p
Now use the following command to create the OTRS database on Debian 11:
MariaDB [(none)]> create database otrsdb character set utf8 collate utf8_general_ci;
Next, use the following command to create the database user and grant all the privileges to it:
MariaDB [(none)]> grant all on otrsdb.* to otrsuser@localhost identified by 'password';
Flush the privileges and exit from the MariaDB shell:
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit;
At this point, edit the MariaDB configuration file and tweak some settings:
sudo vi /etc/mysql/mariadb.conf.d/50-server.cnf
Update the following lines inside the [mysqld] section as shown below:
max_allowed_packet = 64M
query_cache_size = 32M
innodb_log_file_size = 256M
When you are done, save and close the file.
To apply the changes, restart the MariaDB service:
sudo systemctl restart mariadb
5. Configure Apache For OTRS Ticket System
At this point, you need to link the OTRS Apache configuration file to the Apache web root directory to serve OTRS via Apache. To do this, run the command below:
sudo ln -s /opt/otrs/scripts/apache2-httpd.include.conf /etc/apache2/sites-enabled/
Disable the default Apache site by running the command below:
sudo a2dissite 000-default.conf
Next, enable the required Apache modules with the following command:
sudo a2enmod perl version deflate filter headers
Set the correct ownership for the /opt/otrs directory:
# sudo chown -R otrs: /opt/otrs/
# sudo usermod -aG www-data otrs
Update OTRS file permissions by using the command below on Debian 11:
sudo /opt/otrs/bin/otrs.SetPermissions.pl --web-group=www-data
Check Apache configuration for any error:
sudo apachectl -t
Output
Syntax OK
To apply the changes, restart the Apache service:
sudo systemctl restart apache2
If you have a firewall running on your server, you need to allow external access to Apache service:
sudo ufw allow 80/tcp
6. Access the OTRS Ticket System Dashboard
At this point, you can access your OTRS through the web interface by typing your server’s IP address in your web browser followed by /otrs/installer.pl:
http://server-ip-address/otrs/installer.pl
You will see the OTRS Welcome screen on Debian 11. Click Next to continue.

Next, Accept the license and Continue.

Then, you will see the database selection. Choose MySQL, Use an existing database for OTRS, and click Next. At this point, you need to enter the OTRS Database credentials and click Next.

In the next screen, you should see the database setup is successful. Then, click Next.

Now you should see the system settings screen. Define your required settings and click Next.

Define your SMTP server or leave it blank and click on the Skip this step button.

Once the installation has been completed, you should see the server URL with the login username and password. Click on the provided URL.

You will be redirected to the OTRS Community Edition login screen on Debian 11. Enter the username and password and click Login.

You should see the OTRS Community Edition dashboard on Debian 11.

You can see the “OTRS Daemon not running error” on the above screen.
To resolve this error, run the following commands on your server:
# sudo -Hiu otrs /opt/otrs/bin/otrs.Daemon.pl start
# sudo cp /opt/otrs/var/cron/otrs_daemon{.dist,}
# sudo -Hiu otrs /opt/otrs/bin/Cron.sh start
Now, refresh the OTRS Community Edition screen. You should see that the error is now gone.
Conclusion
At this point, you have learned to Install and Configure the OTRS Ticket System on Debian 11.
Hope you enjoy it. You may also interested in these articles:
Set up ProcessWire CMS on Debian 11
Fix Java Error – Failed To Validate Certificate For IPMI or KVM