How to Install Request Tracker on Debian Latest

In this tutorial, we will guide you through the steps to download, install, and configure Request Tracker, a popular open-source ticketing system, on the Debian latest operating system.

Prerequisites

Step 1: Update Debian Repository

Update the Debian package repository to ensure that all available software packages are up-to-date. Open the terminal and run the following command:

sudo apt update && sudo apt upgrade

Step 2: Install Dependencies

Install all the dependencies required by Request Tracker by running the command:

sudo apt install build-essential wget gnupg graphviz libapache2-mod-perl2 libcrypt-ssleay-perl libdate-manip-perl libdbi-perl libdbix-searchbuilder-perl libexpat1-dev libfcgi-perl libgettext-perl libmath-random-isaac-perl libmath-random-isaac-xs-perl libmysqlclient-dev libnet-ldap-perl libtemplate-perl libtemplate-perl libxml-parser-perl lynx mariadb-server netcat-traditional patch procmail make

Step 3: Download Request Tracker

Download the latest version of Request Tracker from the official website https://www.bestpractical.com/rt/ using the command:

wget https://download.bestpractical.com/pub/rt/release/rt-latest.tar.gz

Extract the downloaded archive using:

tar -xzf rt-latest.tar.gz

Step 4: Install Request Tracker

In the extracted folder, access the Request Tracker source files and install the software in /opt.

cd rt-*
sudo ./configure --prefix=/opt/rt5 --with-db-type=MySQL --enable-graphviz
sudo make -j2
sudo make install

Once the above steps are completed, create a system user named rt-user with -M to avoid adding the home directory.

sudo useradd -r -U -l -M -c "RT User" -d /opt/rt5 -s /bin/false rt-user

Now, set the ownership and permissions of the RT installed directory using the following command:

sudo chown -R rt-user:www-data /opt/rt5
sudo chmod -R 2775 /opt/rt5

Step 5: Install and Configure MySQL Database

Run the following commands to install and secure the MySQL server:

sudo apt install mariadb-server
sudo mysql_secure_installation

Create a new database and database user for Request Tracker by running the following commands:

sudo mysql -u root -p

CREATE DATABASE rtdatabase CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'rtuser'@'localhost' IDENTIFIED BY 'YourPassword';
GRANT ALL ON rtdatabase.* TO 'rtuser'@'localhost';
FLUSH PRIVILEGES;
exit

Step 6: Configure RT

Copy the sample configuration file /opt/rt5/etc/RT_Config.pm to the configuration file /opt/rt5/etc/RT_SiteConfig.pm by issuing the following command:

sudo cp /opt/rt5/etc/RT_Config.pm /opt/rt5/etc/RT_SiteConfig.pm

Then, edit the configuration file by opening it with a text editor:

sudo nano /opt/rt5/etc/RT_SiteConfig.pm

Find these 4 lines in the file and change them to the following:

Set($DatabaseType, 'mysql');
Set($DatabaseHost, 'localhost');
Set($DatabaseName , 'rtdatabase');
Set($DatabaseUser , 'rtuser');
Set($DatabasePassword , 'YourPassword');

Save and close the file by pressing CTRL+O and CTRL+X keys.

Step 7: Configure Apache Server

We will use Apache as a web server to run Request Tracker. Install Apache2 using the command:

sudo apt install apache2

Edit the /etc/apache2/sites-available/000-default.conf file and add the following configuration for Request Tracker:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /opt/rt5/share/html
        ServerName example.com
        ServerAlias www.example.com
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        AddDefaultCharset UTF-8
        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Require all granted
        </Directory>
        Alias /NoAuth/images/ /opt/rt5/share/html/NoAuth/images/
        <Directory "/opt/rt5/share/html/NoAuth/images">
                Options -Indexes
                Require all granted
        </Directory>

        ScriptAlias / /opt/rt5/sbin/rt-server.fcgi/
        <Directory /opt/rt5/sbin>
                Require all granted
        </Directory>
</VirtualHost>

Make sure to change the ServerName and ServerAlias values with your domain name or IP address.

Step 8: Restart Services

Once completed, restart both the Apache and MariaDB services using the following commands:

sudo systemctl restart apache2
sudo systemctl restart mariadb

Step 9: Access Request Tracker

Request Tracker is installed and can be accessed through your web browser. Open your browser and enter the following URL:

http://Your_IP_or_Domain_Name/

You will be directed to the RT login page. Use the following credentials to log in:

Username: root
Password: password

You should now have access to the Request Tracker dashboard.

Congratulations! You have successfully installed Request Tracker on Debian Latest.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!