How to Install OTRS on AlmaLinux, Rocky Linux, Debian, and Ubuntu

OTRS is an open-source helpdesk and ticketing system used for customer support and service management. This guide will walk you through installing OTRS on AlmaLinux, Rocky Linux, Debian, and Ubuntu.


Prerequisites:

Before starting the installation, ensure the following:

  • A server running AlmaLinux, Rocky Linux, Debian, or Ubuntu.
  • Root or sudo access to your server.
  • LAMP stack (Linux, Apache, MySQL/MariaDB, PHP) installed.
  • A domain or subdomain pointing to your server.

Step 1: Update the System

Make sure all system packages are up-to-date.

  • For Ubuntu/Debian:
 
sudo apt update && sudo apt upgrade -y
  • For AlmaLinux/Rocky Linux:
 
sudo dnf update -y

Step 2: Install Required Software

OTRS requires Apache, MySQL/MariaDB, PHP, and other dependencies. Let’s install them.

  1. Install Apache, MySQL/MariaDB, PHP, and required PHP extensions:
  • For Ubuntu/Debian:
 
sudo apt install apache2 mariadb-server php php-mysql php-gd php-xml php-mbstring php-intl libapache2-mod-php libxml2-dev libssl-dev -y
  • For AlmaLinux/Rocky Linux:
 
sudo dnf install httpd mariadb-server php php-mysqlnd php-gd php-xml php-mbstring php-intl libapache2-mod-php libxml2-devel libssl-devel -y

Step 3: Configure the Database

OTRS requires a database to store its data. Let’s create a database for OTRS.

  1. Log in to MariaDB/MySQL:
 
sudo mysql -u root -p
  1. Create a database and user for OTRS:
sql
 
CREATE DATABASE otrs; CREATE USER 'otrs'@'localhost' IDENTIFIED BY 'your_password'; GRANT ALL PRIVILEGES ON otrs.* TO 'otrs'@'localhost'; FLUSH PRIVILEGES; EXIT;

Step 4: Install OTRS

  1. Download OTRS from the official website:
 
cd /opt sudo wget https://ftp.otrs.org/pub/otrs/otrs-6.0.30.tar.gz sudo tar -zxvf otrs-6.0.30.tar.gz sudo mv otrs-6.0.30 otrs
  1. Set the correct permissions for OTRS:
 
sudo chown -R apache:apache /opt/otrs

Step 5: Configure OTRS

  1. the configuration file:
 
cd /opt/otrs sudo cp Kernel/Config.pm.dist Kernel/Config.pm
  1. the database configuration in OTRS:
 
sudo nano Kernel/Config.pm

Search for the following section and update the database settings:

perl
 
$Self->{'DatabaseHost'} = 'localhost'; $Self->{'Database'} = 'otrs'; $Self->{'DatabaseUser'} = 'otrs'; $Self->{'DatabasePw'} = 'your_password';

Step 6: Set Up the OTRS Web Interface

  1. Create an Apache configuration file for OTRS:
 
sudo nano /etc/httpd/conf.d/otrs.conf # For AlmaLinux/Rocky Linux
  • For Ubuntu/Debian:
 
sudo nano /etc/apache2/sites-available/otrs.conf
  1. Add the following content to the configuration file:
apache
 
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /opt/otrs/var/httpd/htdocs ServerName yourdomain.com ErrorLog /var/log/httpd/otrs_error_log CustomLog /var/log/httpd/otrs_access_log combined <Directory /opt/otrs/var/httpd/htdocs> AllowOverride All Require all granted </Directory> </VirtualHost>
  1. Enable the site and rewrite module (for Ubuntu/Debian):
 
sudo a2ensite otrs.conf sudo a2enmod rewrite
  1. Restart Apache:
  • For Ubuntu/Debian:
 
sudo systemctl restart apache2
  • For AlmaLinux/Rocky Linux:
 
sudo systemctl restart httpd

Step 7: Configure the OTRS Cron Jobs

  1. Set up cron jobs for OTRS:
 
cd /opt/otrs sudo crontab -e -u apache
  1. Add the following lines to the crontab:
 
*/5 * * * * /opt/otrs/bin/otrs.Console.pl Maint::Ticket::ProcessPendingTickets */5 * * * * /opt/otrs/bin/otrs.Console.pl Maint::Ticket::SendPendingNotifications */5 * * * * /opt/otrs/bin/otrs.Console.pl Maint::Database::Reorganize
  1. Save and exit.

Step 8: Complete the OTRS Setup via Web Interface

  1. Access OTRS in your browser at http://yourdomain.com.

  2. Complete the setup wizard:

    • You will be prompted to set the OTRS administrator credentials and configure initial settings.
    • After the setup, you can log in as the admin user to manage your tickets.

Step 9: Secure OTRS with SSL (Optional)

For production environments, it is recommended to secure OTRS with SSL. You can use Let’s Encrypt to obtain a free SSL certificate.

  1. Install Certbot:
  • For Ubuntu/Debian:
 
sudo apt install certbot python3-certbot-apache -y
  • For AlmaLinux/Rocky Linux:
 
sudo dnf install certbot python3-certbot-apache -y
  1. Obtain an SSL certificate:
 
sudo certbot --apache -d yourdomain.com
  1. Restart Apache to apply the SSL configuration.

Step 10: Access OTRS in the Browser

After completing the installation, you can log in to your OTRS system at http://yourdomain.com or https://yourdomain.com if SSL is configured.

Was this answer helpful? 0 Users Found This Useful (0 Votes)

Powered by WHMCompleteSolution