Install OTRS Ticketting System on Debian 11

1
234

Welcome to our tutorial on how to install OTRS ticketting system on Debian 11. OTRS, an acronym for Open Source Ticket Request System, is a flexible ticket request and process management system for customer services, Helpdesk, and IT services.

OTRS ships with a comprehensive list of features that you can check them on the OTRS feature list page.

Ticket Booking System In Python Wit...
Ticket Booking System In Python With Source Code 2020 Free Download

Install OTRS Ticketting System on Debian 11

OTRS is available as a commercial product as well as a community edition. In this tutorial, however, we will learn how to install OTRS community edition on Debain 11 system.

We will install OTRS ticketting system on Debian 11 by building it from the source.

To begin with;

  • Create OTRS system user account
sudo useradd -r -m -d /opt/otrs -c "OTRS User" -s /usr/sbin/nologin otrs
  • Install Required Build Tools
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
  • Download latest OTRS Source Code from the download’s page and extract it to /opt directory.
wget -qO- \
https://otrscommunityedition.com/download/otrs-community-edition-6.0.35.tar.gz \
| tar xz -C /opt/otrs --strip-components=1
  • Next, run the OTRS Perl script to check if all required modules are in place.
perl /opt/otrs/bin/otrs.CheckModules.pl

Sample command 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 XML::LibXML......................ok (v2.0134)
  o XML::LibXSLT.....................ok (v1.99)
  o XML::Parser......................ok (v2.46)
  o YAML::XS.........................ok (v0.82)

If any Perl module is missing, install using the package manager or CPAN.

  • Activate the default OTRS configuration, /opt/otrs/Kernel/Config.pm.dist, by renaming it to remove the .dist extension;
cp /opt/otrs/Kernel/Config.pm{.dist,}

Once you activate the configuration file, check if other required modules are okay;

for i in cgi-bin/index.pl cgi-bin/customer.pl otrs.Console.pl; do \
perl -cw /opt/otrs/bin/$i; done

Sample Output;

/opt/otrs/bin/cgi-bin/index.pl syntax OK
/opt/otrs/bin/cgi-bin/customer.pl syntax OK
/opt/otrs/bin/otrs.Console.pl syntax OK

Ensure everything is Okay before you can proceed.

  • Run MySQL initial security script;
mysql_secure_installation
  • Create OTRS Database and Database User
mysql -u root -p -e "create database otrsdb character set utf8 collate utf8_general_ci;"
mysql -u root -p -e "grant all on otrsdb.* to [email protected] identified by 'ChangeME';"
mysql -u root -p -e "flush privileges;"

Update the database configuration with the settings below;

max_allowed_packet   = 64M
query_cache_size     = 32M
innodb_log_file_size = 256M

Please these lines within the [mysqld] section. Use the command below;

sed -i.bak -e \
'/\[mysqld\]/amax_allowed_packet   = 64M\nquery_cache_size     = 32M\ninnodb_log_file_size = 256M' \
/etc/mysql/mariadb.conf.d/50-server.cnf

Restart the database service;

systemctl restart mariadb
  • Setup Apache OTRS Site Configuration

By default, OTRS ships with default Apache configuration, /opt/otrs/scripts/apache2-httpd.include.conf.

Thus, instead of re-inventing the wheel, just link this configuration file to Apache sites-enabled directory to use it to serve OTRS.

ln -s /opt/otrs/scripts/apache2-httpd.include.conf /etc/apache2/sites-enabled/

Disable the default Apache site configuration;

a2dissite 000-default.conf

Next, enable the required Apache modules;

a2enmod perl version deflate filter headers

Set the ownership of the /opt/otrs;

chown -R otrs: /opt/otrs/
usermod -aG www-data otrs

Update OTRS Files Permissions

/opt/otrs/bin/otrs.SetPermissions.pl --web-group=www-data

Check Apache configuration for any error and restart Apache Web Server;

apachectl -t
systemctl restart apache2

Finalize Setup of OTRS on Browser

Allow external access to Apache service;

ufw allow 80/tcp

Next, access the OTRS installer via the http://HOST_IP_OR_DOMAIN/otrs/installer.pl.

  • On the first step, you need to Accept End User License Agreement. Thus click Next and scroll down and accept the license.
Install OTRS Ticketting System on Debian 11
  • Define OTRS database connections details created above. If you have not already created the database, you can choose to create a new one.

Thus select “Use an existing database for OTRS” and proceed to define the database connection details.

Install OTRS Ticketting System on Debian 11

Once you enter the database connection settings, verify the connection before you can proceed.

Install OTRS Ticketting System on Debian 11

The database setup will proceed when you click Next.

otrs database setup

Once it is done, click Next.

  • OTRS general and Mail settings;
Install OTRS Ticketting System on Debian 11

Click Next to configure your email settings.

  • OTRS Login Credentials

At the finish, you will see the OTRS login details.

otrs login credentials
  • OTRS Dashboard
otrs dashboard

If you see that the OTRS Daemon is not running, start the OTRS Daemon;

sudo -Hiu otrs /opt/otrs/bin/otrs.Daemon.pl start

Next, ensure that the OTRS cron jobs under /opt/otrs/var/cron/ exists without the .dist extension and start them;

sudo -Hiu otrs cp /opt/otrs/var/cron/aaa_base{.dist,}
sudo -Hiu otrs cp /opt/otrs/var/cron/otrs_daemon{.dist,}
sudo -Hiu otrs /opt/otrs/bin/Cron.sh start

And that is how you can easily install OTRS Ticketting System on Debian 11.

Read more on the administration page.

Other Tutorials

Install Zammad Ticketing System on Debian 11

Install osTicket Ticketing system on Debian 11/Debian 10

1 COMMENT

  1. Hi.
    Very cool tutorial to setup OTRS on Debian 11. I could follow everything and all makes sense. But I am hanging at the end as I receive the Message on top of the web client that the OTRS Daemon is not running and I tried “sudo -Hiu otrs /opt/otrs/bin/otrs.Daemon.pl start”. But any of the last four commands return: This account is currently not available.
    What to do?

LEAVE A REPLY

Please enter your comment!
Please enter your name here