This tutorial will cover how to install Request Tracker (RT) on Debian 10. Request Tracker, commonly abbreviated as RT, is an open-source enterprise grade ticketing system. It can be used to track and manage customer requests, internal project tasks, and workflows.
Some of the features offered by Request Tracker include;
- Integration with Active Directory, SAML, and other authentication systems
- SLA Automation and Tracking
- Self-Service Customer Portal
- Predefined Ticket Actions
- REST 2 API for Integrations
- Multiple Search Options: free text (simple) search, query builder, and advanced
- Full Text Search on Message History
- Full Custom Field Support for any data you need to track
- Customizable Dashboards with Key Ticket Information
- Fine-grained Rights and Permissions
- Automatic Notifications based on message or other ticket updates
- RSS Feeds of ticket activity based on any arbitrary search
- Time tracking and Task Priority
- General Data Protection Regulation (GDPR) Support
- PGP and S/MIME support
Read more on Request Tracker features page.
Install Request Tracker (RT) on Debian 10
Update Package Cache
Update system package cache;
apt update
Install Request Tracker (RT) on Debian 10
As of this writing, the default Debian 10 repos provide packages for RT 4.4.3.
apt-cache policy request-tracker*
request-tracker4:
Installed: (none)
Candidate: 4.4.3-2
Version table:
4.4.3-2 500
500 http://deb.debian.org/debian buster/main amd64 Packages
Build and Install Request Tracker (RT) on Debian 10
Since the repositories do not provide the latest release version of Request Tracker, we will be building RT 5 from the source on Debian 10.
Install Required Build tools
Hence, install some required tools;
apt install build-essential libapache2-mod-fcgid libssl-dev libexpat1-dev libdbd-mysql-perl liblwp-protocol-https-perl libhtml-formattext-withlinks-andtables-perl libhtml-formattext-withlinks-perl html2text graphviz
The packages installed here are not exhaustive. We will install other perl dependencies while building RT from source.
Install Apache Web Server
Run the command below to install Apache Web Server;
apt install apache2
Install MariaDB Database Server
Install MariaDB 10.5 on Debian 10;
apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
add-apt-repository 'deb [arch=amd64] http://mariadb.mirror.globo.tech/repo/10.5/debian buster main'
apt update apt install mariadb-server mariadb-client
Install Request Tracker (RT) on Debian 10
Download RT 5 Tarball by navigating to RT downloads page and grab the tarball for the latest stable version of RT, current RT 5.0.1 as of this writing.
wget https://download.bestpractical.com/pub/rt/release/rt-5.0.1.tar.gz
Extract Request Tracker Source code
In my case, I downloaded the tarball to the current working directory.
You can now extract the source code;
tar xzf ~/rt-5.0.1.tar.gz
Compile and Install Request Tracker (RT) on Debian 10
Change to RT 5 source code directory and configure it to adapt it to the system as well as check if required package dependency is met;
cd ~/rt-5.0.1/
./configure
Next, check for package dependency.
make testdeps
...
users / groups:
rt group (www-data) .................................... ok (gid 33)
bin user (root) ........................................ ok (uid 0)
libs user (root) ....................................... ok (uid 0)
libs group (bin) ....................................... ok (gid 2)
web user (www-data) .................................... ok (uid 33)
web group (www-data) ................................... ok (gid 33)
CORE dependencies:
Apache::Session >= 1.53 ................................ MISSING
Business::Hours ........................................ MISSING
CGI >= 4.00 ............................................ ok (4.46)
CGI::Cookie >= 1.20 .................................... ok (4.46)
CGI::Emulate::PSGI ..................................... MISSING
CGI::PSGI >= 0.12 ...................................... MISSING
CSS::Minifier::XS ...................................... MISSING
CSS::Squish >= 0.06 .................................... MISSING
Class::Accessor::Fast .................................. MISSING
Clone .................................................. MISSING
Convert::Color ......................................... MISSING
Crypt::Eksblowfish ..................................... MISSING
DBI >= 1.37 ............................................ ok (1.643)
...
Fixing Request Tracker Missing Perl Dependencies
You can fix the missing perl dependencies by installing them one by one or by simply using make fixdeps
command. In order to use the make fixdeps
command for fixing the missing packages, configure CPAN shell and install cpanminus.
perl -MCPAN -e shell
CPAN.pm requires configuration, but most of it can be done automatically. If you answer 'no' below, you will enter an interactive dialog for each configuration option instead. Would you like to configure as much as possible automatically? [yes] yes Autoconfiguration complete. ... ... cpan shell -- CPAN exploration and modules installation (v2.22) Enter 'h' for help. cpan[1]> quit
Install CPANMINUS. cpanminus
provides a command-line (non interactive) interface to automatically download, build and install Perl modules from CPAN.
apt install cpanminus
Next, fix the dependencies;
make fixdeps
This command might take time to complete. Can grab a glass of coffee in the meantime, -:)
Once the dependencies are installed, you can re-verify;
make testdeps
...
FASTCGI dependencies:
FCGI >= 0.74 ........................................... ok (0.78)
GPG dependencies:
File::Which ............................................ ok
GnuPG::Interface >= 1.00 ............................... ok (1.01)
PerlIO::eol ............................................ ok
MYSQL dependencies:
DBD::mysql >= 2.1018, != 4.042 ......................... ok (4.050)
SMIME dependencies:
Crypt::X509 ............................................ ok
File::Which ............................................ ok
String::ShellQuote ..................................... ok
---------------------------------------------------------------------------
All dependencies found.
Install other Perl Modules like GD;
cpanm GD
Install Request Tracker (RT) on Debian 10
You can now install Request Tracker (RT) on Debian 10;
make install
...
done
...
# Make the web ui's data dir writable
chmod 0770 /opt/rt5/var/mason_data \
/opt/rt5/var/session_data
chown -R www-data /opt/rt5/var/mason_data \
/opt/rt5/var/session_data
chgrp -R www-data /opt/rt5/var/mason_data \
/opt/rt5/var/session_data
Congratulations. RT is now installed.
You must now configure RT by editing /opt/rt5/etc/RT_SiteConfig.pm.
(You will definitely need to set RT's database password in
/opt/rt5/etc/RT_SiteConfig.pm before continuing. Not doing so could be
very dangerous. Note that you do not have to manually add a
database user or set up a database for RT. These actions will be
taken care of in the next step.)
After that, you need to initialize RT's database by running
'make initialize-database'
Create Request Tracker Database and Database user
Next, you need to create or if already created, define the Request Tracker database details.
Therefore, within the RT source directory, run the command below;
cd ~/rt-5.0.1/
make initialize-database
When the command is run, you are prompted to enter the database root password. In our case, we use MariaDB and hence, we provide MariaDB root password. If the root user has no password set, just press ENTER.
/usr/bin/perl -I/opt/rt5/local/lib -I/opt/rt5/lib sbin/rt-setup-database --action init --prompt-for-dba-password
In order to create or update your RT database, this script needs to connect to your mysql instance on localhost (port '') as root
Please specify that user's database password below. If the user has no database
password, just press return.
Password:
When you enter password (or press ENTER for no root password), the script then creates rt5
and rt_user
as RT database and database user respectively. It then populates the database with relevant data.
Working with:
Type: mysql
Host: localhost
Port:
Name: rt5
User: rt_user
DBA: root
Now creating a mysql database rt5 for RT.
Done.
Now populating database schema.
Done.
Now inserting database ACLs.
Done.
Now inserting RT core system objects.
Done.
Now inserting data.
Done inserting data.
Done.
Configure Request Tracker
The default configuration file for Request Tracker 5 is /opt/rt5/etc/RT_SiteConfig.pm
.
To begin with, set the RT domain name, the organization and the web domain.
vim /opt/rt5/etc/RT_SiteConfig.pm
...
#Set( $rtname, 'example.com');
Set( $rtname, 'itnixpro.com');
Set( $Organization, 'itnixpro.com' );
Set( $WebDomain, 'rt5.itnixpro.com' );
Save and exit the file.
Similarly, set Request Tracker Logging
cat << 'EOL' >> /opt/rt5/etc/RT_SiteConfig.pm
Set($LogToFile, 'debug');
Set($LogToFileNamed, 'rt5.itnixpro.com.log');
Set($LogDir, '/var/log/rt5');
EOL
mkdir /var/log/rt5
chown -R www-data: /var/log/rt5
Running Request Tracker in Standalone Mode
You can now run Request Tracker. Note that it can be run in standalone mode or via a web server.
To run RT in standalone mode;
systemctl stop apache2
/opt/rt5/sbin/rt-server
This should open the web server port 80 and you should be able to access your Request Tracker web interface via the url, http://server-IP-or-domain
.
To confirm this;
netstat -altnp | grep :80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 3829/perl
If UFW is running, open this port;
ufw allow 80/tcp
Now access the Request Tracker Web Interface via http://server-IP-or-domain
. You should land on Request Tracker login page.
If you need to use a different port, specify the port by passing the --port <port>
. for example;
/opt/rt5/sbin/rt-server --port 8080
Running Request Tracker via Web Server
You can stop RT standalone mode by pressing CTRL+c and proceed to configure Apache to Server RT on Debian.
Ensure web server is installed, in this example, Apache;
apt install apache2
Set the maximum HTTP request length by editing the file, /etc/apache2/mods-available/fcgid.conf
, and adding the line, FcgidMaxRequestLen 1073741824
.
vim /etc/apache2/mods-available/fcgid.conf
<IfModule mod_fcgid.c>
FcgidConnectTimeout 20
FcgidMaxRequestLen 1073741824
<IfModule mod_mime.c>
AddHandler fcgid-script .fcgi
</IfModule>
</IfModule>
Save and exit the file.
Create Request Tracker site configuration file;
cat > /etc/apache2/sites-available/rt5.itnixpro.conf << 'EOL'
<VirtualHost rt5.itnixpro.com>
AddDefaultCharset UTF-8
ScriptAlias / /opt/rt5/sbin/rt-server.fcgi/
DocumentRoot "/opt/rt5/share/html"
<Location />
Options +ExecCGI
AddHandler fcgid-script fcgi
Require all granted
</Location>
ErrorLog /var/log/apache2/rt5.error.log
TransferLog /var/log/apache2/rt5.access.log
LogLevel debug
</VirtualHost>
EOL
Save and exit the file and check the syntax error;
apachectl -t
If you get, Syntax OK
, you are good to go.
Set the ownership of the Document root directory;
chown -R www-data: /opt/rt5/share/html
Enable fcgid module;
a2enmod fcgid
Enable RT 5 site configuration;
a2ensite rt5.itnixpro.conf
Disable default site;
a2dissite 000-default.conf
Check RT configuration syntax;
perl -c /opt/rt5/etc/RT_SiteConfig.pm
If you get syntax OK, (/opt/rt5/etc/RT_SiteConfig.pm syntax OK
), proceed.
Restart Apache;
systemctl restart apache2
Access Request Tracker on Browser
Navigate to RT web interface via the address http://<your-domain>
.
Login using the default RT credentials:
- Username: root
- Password: password
You can reset the password as described here;
Reset Default Root Password on Request Tracker (RT)
Upon successful login, you land on RT Web interface.
And that is it. You can now proceed to configure your Request Tracker as you see fit.
That concludes our guide on how to install Request Tracker (RT) on Debian 10.
Further Reading
Request Tracker 5 Documentation
Configure Request Tracker (RT) to Send Mails using Postfix
Other Tutorials
Configure Nginx Reverse Proxy for Kibana
Install and Setup Wazuh Server with ELK Stack on Ubuntu 20.04