As organizations strive to provide excellent customer support, implementing a reliable ticketing system becomes crucial. OTRS (OpenSource Trouble Ticket System) is a popular open-source solution that helps businesses streamline their helpdesk and customer support operations. In this article, we will walk you through the step-by-step process of installing OTRS on a Debian 11 server.
Prerequisites
Before diving into the installation process, make sure you have the following prerequisites in place:
- A server running Debian 11.
- A root password configured on all servers.
Install Perl Dependency
OTRS is written in Perl, so it’s essential to install all the necessary Perl dependencies on your server. Start by updating and upgrading all system packages using the following commands:
apt update -y apt upgrade -y
Next, install the required Perl modules by running the following command:
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 -y
Ensure that all the required dependencies are successfully installed before proceeding to the next step.
Install Apache and MariaDB Server
To host OTRS, you need to install the Apache web server and the MariaDB database server. Use the following command to install both packages:
apt install apache2 mariadb-server mariadb-client -y
Once installed, start the Apache and MariaDB services and enable them to start after system reboots:
systemctl start apache2 mariadb systemctl enable apache2 mariadb
Configure MariaDB Server
Before proceeding with the OTRS installation, it’s crucial to secure the MariaDB installation. Run the following script to initiate the security setup:
mysql_secure_installation
This script will guide you through a series of questions to enhance the security of your MariaDB installation. Answer the questions as shown below:
Enter current password for root (enter for none): Set root password? [Y/n]: N 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
Next, edit the MariaDB configuration file using the following command:
nano /etc/mysql/mariadb.conf.d/50-server.cnf
Within the [mysqld]
section, add the following lines to adjust some settings:
max_allowed_packet=256M character-set-server=utf8 collation-server=utf8_general_ci innodb_buffer_pool_size=4G innodb_log_file_size=1G
Save and close the file. Restart the MariaDB service to apply the changes:
systemctl restart mariadb
Install OTRS on Debian 11
Now it’s time to install OTRS on your Debian 11 server. Begin by creating a dedicated user to run OTRS:
useradd -r -m -d /opt/otrs -c "OTRS User" otrs
Add the OTRS user to the www-data
group:
usermod -aG www-data otrs
Download the latest version of OTRS from the official website using the following command:
wget https://otrscommunityedition.com/download/otrs-community-edition-6.0.38.tar.gz
Extract the downloaded file to the OTRS directory:
tar xvfz otrs-community-edition-6.0.38.tar.gz -C /opt/otrs --strip-components=1
Change the ownership of the OTRS directory:
chown -R otrs:otrs /opt/otrs
Check all required Perl modules using the following command:
perl /opt/otrs/bin/otrs.CheckModules.pl
Make sure that all the required Perl modules are installed correctly. Once verified, rename the OTRS configuration file:
cp /opt/otrs/Kernel/Config.pm{.dist,}
Install the required dependencies by running the following script:
perl -cw /opt/otrs/bin/cgi-bin/index.pl perl -cw /opt/otrs/bin/cgi-bin/customer.pl perl -cw /opt/otrs/bin/otrs.Console.pl perl /opt/otrs/bin/otrs.SetPermissions.pl
Configure Apache for OTRS
To serve OTRS via Apache, you need to link the OTRS Apache configuration file to the Apache web root directory. Use the following command:
ln -s /opt/otrs/scripts/apache2-httpd.include.conf /etc/apache2/sites-enabled/
Disable the default Apache site:
a2dissite 000-default.conf
Enable the required Apache modules:
a2enmod perl version deflate filter headers
Fix the Apache permissions:
/opt/otrs/bin/otrs.SetPermissions.pl --web-group=www-data
Finally, restart the Apache service to apply the configuration:
systemctl restart apache2
You can check the status of the Apache service with the following command:
systemctl status apache2
Complete OTRS Web Installation
With OTRS installed and configured, it’s time to complete the web installation process. Open your web browser and access the OTRS web installation wizard using the URL http://your-server-ip/otrs/installer.pl
. You should see the OTRS welcome page.
Click on the “Next” button to proceed to the OTRS license screen. Read the license and click on the “Accept license and continue” button. On the database selection screen, choose your database and click “Next”. Provide your MySQL root password and click on the “Check database settings” button.
If everything is configured correctly, you should see a success message. Provide a new database user and password, then click on the “Next” button. Configure the system settings according to your requirements and click “Next”. Define your email configuration, or skip this step if you prefer to set it up later.
Once the installation is complete, you will see the server URL with login credentials. Click on the provided URL to access the OTRS login screen. Enter your admin credentials and click on the “Login” button. You should now see the OTRS dashboard.
To resolve the “OTRS Daemon not running” error, run the following command on your server interface:
sudo -Hiu otrs /opt/otrs/bin/otrs.Daemon.pl start cp /opt/otrs/var/cron/otrs_daemon{.dist,} sudo -Hiu otrs /opt/otrs/bin/Cron.sh start
Refresh the OTRS screen, and the error should no longer be displayed.
Conclusion
Congratulations! You have successfully installed OTRS on your Debian 11 server. With OTRS, you can effectively manage customer tickets and requests, streamline your helpdesk operations, and enhance your customer support services. Implementing OTRS can significantly improve your service management quality.
If you are looking for reliable and scalable cloud hosting solutions, consider Shape.host. They offer Cloud VPS services with top-notch performance and excellent customer support. Shape.host is your trusted partner in the cloud hosting industry, empowering businesses with efficient and secure hosting solutions.