Install Request Tracker (RT) on Ubuntu 20.04/Ubuntu 22.04

This tutorial will cover how to install Request Tracker (RT) on Ubuntu 20.04/Ubuntu 22.04. 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.

Install Request Tracker (RT) on Ubuntu 20.04

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 Ubuntu 20.04/Ubuntu 22.04

Update Package Cache

Update system package cache;

apt update

Install Required Build tools

We will be building RT 5 from the source on Ubuntu. As of this writing, the Universe repos provides packages for RT 5.0.1 on Ubuntu 22.04 and RT 4.4.4 on Ubuntu 20.04.

apt-cache policy request-tracker5
request-tracker5:
  Installed: (none)
  Candidate: 5.0.1+dfsg-1ubuntu1
  Version table:
     5.0.1+dfsg-1ubuntu1 500
        500 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages

Hence, in order to install the latest release and stable version of Request Tracker on Ubuntu, you have to build it from the source.

Thus, install some required tools;

apt install build-essential libapache2-mod-fcgid \
libssl-dev libexpat1-dev libdbd-mysql-perl gnupg2 \
liblwp-protocol-https-perl html2text starlet \
libhtml-formattext-withlinks-andtables-perl libgd-perl \
libhtml-formattext-withlinks-perl libgraphviz-perl \
libregexp-common-perl libregexp-common-net-cidr-perl 

The packages installed here are not exhaustive. We will install other perl dependencies while building RT from source.

Install Apache Web Server on Ubuntu

Run the command below to install Apache Web Server;

apt install apache2

Install MariaDB Database Server

MariaDB 10.8 is the current stable release as of this writing. To install MariaDB 10.8 on Ubuntu 20.04/Ubuntu 22.04;

wget -qO- https://mariadb.org/mariadb_release_signing_key.asc \
| gpg --dearmor > /etc/apt/trusted.gpg.d/mariadb.gpg
echo \
"deb [arch=amd64] http://mariadb.mirror.globo.tech/repo/10.8/ubuntu $(lsb_release -sc) main" \
> /etc/apt/sources.list.d/mariadb.list
apt update
apt install mariadb-server mariadb-client

Install Request Tracker (RT) on Ubuntu 20.04/Ubuntu 22.04

Download RT 5 Tarball

Navigate to RT downloads page and grab the tarball for the latest stable version of RT, current RT 5.0.3 as of this writing.

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

Extract Request Tracker Source code

You can now extract the source code;

tar xzf rt-5.0.3.tar.gz

Compile and Install Request Tracker (RT) on Ubuntu 20.04/Ubuntu 22.04

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.3/
./configure

Next, check for package dependency.

make testdeps

A number of dependencies could be missing;

/usr/bin/perl ./sbin/rt-test-dependencies
perl:
    5.10.1 ................................................. ok (5.30.0)

users / groups:
    rt group (www-data) .................................... ok (gid 33)
    bin user (root) ........................................ ok (uid 0)
    libs user (root) ....................................... ok (uid 0)
    libs group (root) ...................................... ok (gid 0)
    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)
    DBIx::SearchBuilder >= 1.71 ............................ MISSING
    Data::GUID ............................................. MISSING
    Data::ICal ............................................. MISSING
    Data::Page::Pageset .................................... MISSING
    Date::Extract >= 0.02 .................................. MISSING
    Date::Manip ............................................ MISSING
    DateTime >= 0.44 ....................................... MISSING
    DateTime::Format::Natural >= 0.67 ...................... MISSING
    DateTime::Locale >= 0.40, != 1.00, != 1.01 ............. MISSING
    Devel::GlobalDestruction ............................... MISSING
    Devel::StackTrace >= 1.19, != 1.28, != 1.29 ............ MISSING
    Digest::MD5 >= 2.27 .................................... ok (2.55)
    Digest::SHA ............................................ ok
    Digest::base ........................................... ok
    Email::Address >= 1.912 ................................ MISSING
    Email::Address::List >= 0.06 ........................... MISSING
    Encode >= 2.64 ......................................... ok (3.01)
    Encode::Detect::Detector ............................... MISSING
    Encode::HanExtra ....................................... MISSING
    Errno .................................................. ok
    File::Glob ............................................. ok
    File::ShareDir ......................................... MISSING
    File::Spec >= 0.8 ...................................... ok (3.78)
    File::Temp >= 0.19 ..................................... ok (0.2309)
    Getopt::Long >= 2.24 ................................... ok (2.5)
    HTML::Entities ......................................... ok
    HTML::FormatExternal ................................... MISSING
    HTML::FormatText::WithLinks >= 0.14 .................... ok (0.15)
    HTML::FormatText::WithLinks::AndTables >= 0.06 ......... ok (0.07)
    HTML::Gumbo ............................................ MISSING
    HTML::Mason >= 1.43 .................................... MISSING
    HTML::Mason::PSGIHandler >= 0.52 ....................... MISSING
    HTML::Quoted ........................................... MISSING
    HTML::RewriteAttributes >= 0.05 ........................ MISSING
    HTML::Scrubber >= 0.08 ................................. MISSING
    HTTP::Message >= 6.07 .................................. ok (6.22)
    HTTP::Request::Common .................................. ok
    IPC::Run3 .............................................. MISSING
    JSON ................................................... MISSING
    JavaScript::Minifier::XS ............................... MISSING
    LWP >= 6.02 ............................................ ok (6.43)
    LWP::Protocol::https ................................... ok
    LWP::Simple ............................................ ok
    LWP::UserAgent >= 6.02 ................................. ok (6.43)
    List::MoreUtils ........................................ MISSING
    Locale::Maketext >= 1.06 ............................... ok (1.29)
    Locale::Maketext::Fuzzy >= 0.11 ........................ MISSING
    Locale::Maketext::Lexicon >= 0.32 ...................... MISSING
    Log::Dispatch >= 2.30 .................................. MISSING
    MIME::Entity >= 5.504 .................................. MISSING
    MIME::Types ............................................ MISSING
    Mail::Header >= 2.12 ................................... MISSING
    Mail::Mailer >= 1.57 ................................... MISSING
    Module::Path ........................................... MISSING
    Module::Refresh >= 0.03 ................................ MISSING
    Module::Runtime ........................................ MISSING
    Module::Versions::Report >= 1.05 ....................... MISSING
    Moose .................................................. MISSING
    MooseX::NonMoose ....................................... MISSING
    MooseX::Role::Parameterized ............................ MISSING
    Mozilla::CA ............................................ MISSING
    Net::CIDR .............................................. MISSING
    Net::IP ................................................ MISSING
    Parallel::ForkManager .................................. MISSING
    Path::Dispatcher >= 1.07 ............................... MISSING
    Plack >= 1.0002 ........................................ MISSING
    Plack::Handler::Starlet ................................ MISSING
    Pod::Select ............................................ ok
    Pod::Usage ............................................. ok
    Regexp::Common ......................................... MISSING
    Regexp::Common::net::CIDR .............................. MISSING
    Regexp::IPv6 ........................................... MISSING
    Role::Basic >= 0.12 .................................... MISSING
    Scalar::Util ........................................... ok
    Scope::Upper ........................................... MISSING
    Storable >= 2.08 ....................................... ok (3.15)
    Sub::Exporter .......................................... MISSING
    Symbol::Global::Name >= 0.05 ........................... MISSING
    Sys::Syslog >= 0.16 .................................... ok (0.35)
    Term::ReadKey .......................................... ok
    Term::ReadLine ......................................... ok
    Text::ParseWords ....................................... ok
    Text::Password::Pronounceable .......................... MISSING
    Text::Quoted >= 2.07 ................................... MISSING
    Text::Template >= 1.44 ................................. MISSING
    Text::WikiFormat >= 0.76 ............................... MISSING
    Text::WordDiff ......................................... MISSING
    Text::Wrapper .......................................... MISSING
    Time::HiRes ............................................ ok
    Time::ParseDate ........................................ MISSING
    Tree::Simple >= 1.04 ................................... MISSING
    UNIVERSAL::require ..................................... MISSING
    URI >= 1.59 ............................................ ok (1.76)
    URI::QueryParam ........................................ ok
    Web::Machine >= 0.12 ................................... MISSING
    XML::RSS >= 1.05 ....................................... MISSING
    namespace::autoclean ................................... MISSING

FASTCGI dependencies:
    FCGI >= 0.74 ........................................... ok (0.79)

GPG dependencies:
    File::Which ............................................ MISSING
    GnuPG::Interface >= 1.02 ............................... MISSING
    PerlIO::eol ............................................ MISSING

MYSQL dependencies:
    DBD::mysql >= 2.1018, != 4.042 ......................... ok (4.050)

SMIME dependencies:
    Crypt::X509 ............................................ MISSING
    File::Which ............................................ MISSING
    String::ShellQuote ..................................... MISSING


---------------------------------------------------------------------------

SOME DEPENDENCIES WERE MISSING:

CORE dependencies:
    Apache::Session >= 1.53 ................................ MISSING
    Business::Hours ........................................ MISSING
    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
    DBIx::SearchBuilder >= 1.71 ............................ MISSING
    Data::GUID ............................................. MISSING
    Data::ICal ............................................. MISSING
    Data::Page::Pageset .................................... MISSING
    Date::Extract >= 0.02 .................................. MISSING
    Date::Manip ............................................ MISSING
    DateTime >= 0.44 ....................................... MISSING
    DateTime::Format::Natural >= 0.67 ...................... MISSING
    DateTime::Locale >= 0.40, != 1.00, != 1.01 ............. MISSING
    Devel::GlobalDestruction ............................... MISSING
    Devel::StackTrace >= 1.19, != 1.28, != 1.29 ............ MISSING
    Email::Address >= 1.912 ................................ MISSING
    Email::Address::List >= 0.06 ........................... MISSING
    Encode::Detect::Detector ............................... MISSING
    Encode::HanExtra ....................................... MISSING
    File::ShareDir ......................................... MISSING
    HTML::FormatExternal ................................... MISSING
    HTML::Gumbo ............................................ MISSING
    HTML::Mason >= 1.43 .................................... MISSING
    HTML::Mason::PSGIHandler >= 0.52 ....................... MISSING
    HTML::Quoted ........................................... MISSING
    HTML::RewriteAttributes >= 0.05 ........................ MISSING
    HTML::Scrubber >= 0.08 ................................. MISSING
    IPC::Run3 .............................................. MISSING
    JSON ................................................... MISSING
    JavaScript::Minifier::XS ............................... MISSING
    List::MoreUtils ........................................ MISSING
    Locale::Maketext::Fuzzy >= 0.11 ........................ MISSING
    Locale::Maketext::Lexicon >= 0.32 ...................... MISSING
    Log::Dispatch >= 2.30 .................................. MISSING
    MIME::Entity >= 5.504 .................................. MISSING
    MIME::Types ............................................ MISSING
    Mail::Header >= 2.12 ................................... MISSING
    Mail::Mailer >= 1.57 ................................... MISSING
    Module::Path ........................................... MISSING
    Module::Refresh >= 0.03 ................................ MISSING
    Module::Runtime ........................................ MISSING
    Module::Versions::Report >= 1.05 ....................... MISSING
    Moose .................................................. MISSING
    MooseX::NonMoose ....................................... MISSING
    MooseX::Role::Parameterized ............................ MISSING
    Mozilla::CA ............................................ MISSING
    Net::CIDR .............................................. MISSING
    Net::IP ................................................ MISSING
    Parallel::ForkManager .................................. MISSING
    Path::Dispatcher >= 1.07 ............................... MISSING
    Plack >= 1.0002 ........................................ MISSING
    Plack::Handler::Starlet ................................ MISSING
    Regexp::Common ......................................... MISSING
    Regexp::Common::net::CIDR .............................. MISSING
    Regexp::IPv6 ........................................... MISSING
    Role::Basic >= 0.12 .................................... MISSING
    Scope::Upper ........................................... MISSING
    Sub::Exporter .......................................... MISSING
    Symbol::Global::Name >= 0.05 ........................... MISSING
    Text::Password::Pronounceable .......................... MISSING
    Text::Quoted >= 2.07 ................................... MISSING
    Text::Template >= 1.44 ................................. MISSING
    Text::WikiFormat >= 0.76 ............................... MISSING
    Text::WordDiff ......................................... MISSING
    Text::Wrapper .......................................... MISSING
    Time::ParseDate ........................................ MISSING
    Tree::Simple >= 1.04 ................................... MISSING
    UNIVERSAL::require ..................................... MISSING
    Web::Machine >= 0.12 ................................... MISSING
    XML::RSS >= 1.05 ....................................... MISSING
    namespace::autoclean ................................... MISSING

GPG dependencies:
    File::Which ............................................ MISSING
    GnuPG::Interface >= 1.02 ............................... MISSING
    PerlIO::eol ............................................ MISSING

SMIME dependencies:
    Crypt::X509 ............................................ MISSING
    File::Which ............................................ MISSING
    String::ShellQuote ..................................... MISSING

Perl library path for /usr/bin/perl:
    /etc/perl
    /usr/local/lib/x86_64-linux-gnu/perl/5.30.0
    /usr/local/share/perl/5.30.0
    /usr/lib/x86_64-linux-gnu/perl5/5.30
    /usr/share/perl5
    /usr/lib/x86_64-linux-gnu/perl/5.30
    /usr/share/perl/5.30
    /usr/local/lib/site_perl
    /usr/lib/x86_64-linux-gnu/perl-base
make: *** [Makefile:273: testdeps] Error 1

If the command gives you such an output on Ubuntu 22.04;

perl:
    5.10.1 ................................................. ok (5.34.0)

users / groups:
    rt group (www) ......................................... MISSING
    bin user (root) ........................................ ok (uid 0)
    libs user (root) ....................................... ok (uid 0)
    libs group (root) ...................................... ok (gid 0)
    web user (www) ......................................... MISSING
    web group (www) ........................................ MISSING

make: *** [Makefile:273: testdeps] Error 1

Add the www user and group to the system;

useradd -r -s /bin/false www
id www
uid=998(www) gid=998(www) groups=998(www)
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.

commit: wrote '/root/.cpan/CPAN/MyConfig.pm'

You can re-run configuration any time with 'o conf init' in the CPAN shell
Terminal does not support AddHistory.

To fix enter>  install Term::ReadLine::Perl


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. The command might take some time;

make fixdeps

Once the dependencies are installed, you can reverify;

make testdeps
/usr/bin/perl ./sbin/rt-test-dependencies
perl:
    5.10.1 ................................................. ok (5.34.0)

users / groups:
    rt group (www) ......................................... ok (gid 998)
    bin user (root) ........................................ ok (uid 0)
    libs user (root) ....................................... ok (uid 0)
    libs group (root) ...................................... ok (gid 0)
    web user (www) ......................................... ok (uid 998)
    web group (www) ........................................ ok (gid 998)

CORE dependencies:
    Apache::Session >= 1.53 ................................ ok (1.94)
    Business::Hours ........................................ ok
    CGI >= 4.00 ............................................ ok (4.54)
    CGI::Cookie >= 1.20 .................................... ok (4.54)
    CGI::Emulate::PSGI ..................................... ok
    CGI::PSGI >= 0.12 ...................................... ok (0.15)
    CSS::Minifier::XS ...................................... ok
    CSS::Squish >= 0.06 .................................... ok (0.10)
    Class::Accessor::Fast .................................. ok
    Clone .................................................. ok
    Convert::Color ......................................... ok
    Crypt::Eksblowfish ..................................... ok
    DBI >= 1.37 ............................................ ok (1.643)
    DBIx::SearchBuilder >= 1.71 ............................ ok (1.71)
    Data::GUID ............................................. ok
    Data::ICal ............................................. ok
    Data::Page::Pageset .................................... ok
    Date::Extract >= 0.02 .................................. ok (0.06)
    Date::Manip ............................................ ok
    DateTime >= 0.44 ....................................... ok (1.58)
    DateTime::Format::Natural >= 0.67 ...................... ok (1.13)
    DateTime::Locale >= 0.40, != 1.00, != 1.01 ............. ok (1.36)
    Devel::GlobalDestruction ............................... ok
    Devel::StackTrace >= 1.19, != 1.28, != 1.29 ............ ok (2.04)
    Digest::MD5 >= 2.27 .................................... ok (2.58)
    Digest::SHA ............................................ ok
    Digest::base ........................................... ok
    Email::Address >= 1.912 ................................ ok (1.912)
    Email::Address::List >= 0.06 ........................... ok (0.06)
    Encode >= 2.64 ......................................... ok (3.08)
    Encode::Detect::Detector ............................... ok
    Encode::HanExtra ....................................... ok
    Errno .................................................. ok
    File::Glob ............................................. ok
    File::ShareDir ......................................... ok
    File::Spec >= 0.8 ...................................... ok (3.80)
    File::Temp >= 0.19 ..................................... ok (0.2311)
    Getopt::Long >= 2.24 ................................... ok (2.52)
    HTML::Entities ......................................... ok
    HTML::FormatExternal ................................... ok
    HTML::FormatText::WithLinks >= 0.14 .................... ok (0.15)
    HTML::FormatText::WithLinks::AndTables >= 0.06 ......... ok (0.07)
    HTML::Gumbo ............................................ ok
    HTML::Mason >= 1.43 .................................... ok (1.59)
    HTML::Mason::PSGIHandler >= 0.52 ....................... ok (0.53)
    HTML::Quoted ........................................... ok
    HTML::RewriteAttributes >= 0.05 ........................ ok (0.05)
    HTML::Scrubber >= 0.08 ................................. ok (0.19)
    HTTP::Message >= 6.07 .................................. ok (6.36)
    HTTP::Request::Common .................................. ok
    IPC::Run3 .............................................. ok
    JSON ................................................... ok
    JavaScript::Minifier::XS ............................... ok
    LWP >= 6.02 ............................................ ok (6.61)
    LWP::Protocol::https ................................... ok
    LWP::Simple ............................................ ok
    LWP::UserAgent >= 6.02 ................................. ok (6.61)
    List::MoreUtils ........................................ ok
    Locale::Maketext >= 1.06 ............................... ok (1.29)
    Locale::Maketext::Fuzzy >= 0.11 ........................ ok (0.11)
    Locale::Maketext::Lexicon >= 0.32 ...................... ok (1.00)
    Log::Dispatch >= 2.30 .................................. ok (2.70)
    MIME::Entity >= 5.504 .................................. ok (5.510)
    MIME::Types ............................................ ok
    Mail::Header >= 2.12 ................................... ok (2.21)
    Mail::Mailer >= 1.57 ................................... ok (2.21)
    Module::Path ........................................... ok
    Module::Refresh >= 0.03 ................................ ok (0.18)
    Module::Runtime ........................................ ok
    Module::Versions::Report >= 1.05 ....................... ok (1.06)
    Moose .................................................. ok
    MooseX::NonMoose ....................................... ok
    MooseX::Role::Parameterized ............................ ok
    Mozilla::CA ............................................ ok
    Net::CIDR .............................................. ok
    Net::IP ................................................ ok
    Parallel::ForkManager .................................. ok
    Path::Dispatcher >= 1.07 ............................... ok (1.08)
    Plack >= 1.0002 ........................................ ok (1.0050)
    Plack::Handler::Starlet ................................ ok
    Pod::Select ............................................ ok
    Pod::Usage ............................................. ok
    Regexp::Common ......................................... ok
    Regexp::Common::net::CIDR .............................. ok
    Regexp::IPv6 ........................................... ok
    Role::Basic >= 0.12 .................................... ok (0.13)
    Scalar::Util ........................................... ok
    Scope::Upper ........................................... ok
    Storable >= 2.08 ....................................... ok (3.23)
    Sub::Exporter .......................................... ok
    Symbol::Global::Name >= 0.05 ........................... ok (0.05)
    Sys::Syslog >= 0.16 .................................... ok (0.36)
    Term::ReadKey .......................................... ok
    Term::ReadLine ......................................... ok
    Text::ParseWords ....................................... ok
    Text::Password::Pronounceable .......................... ok
    Text::Quoted >= 2.07 ................................... ok (2.10)
    Text::Template >= 1.44 ................................. ok (1.60)
    Text::WikiFormat >= 0.76 ............................... ok (0.81)
    Text::WordDiff ......................................... ok
    Text::Wrapper .......................................... ok
    Time::HiRes ............................................ ok
    Time::ParseDate ........................................ ok
    Tree::Simple >= 1.04 ................................... ok (1.34)
    UNIVERSAL::require ..................................... ok
    URI >= 1.59 ............................................ ok (5.10)
    URI::QueryParam ........................................ ok
    Web::Machine >= 0.12 ................................... ok (0.17)
    XML::RSS >= 1.05 ....................................... ok (1.59)
    namespace::autoclean ................................... ok

GPG dependencies:
    File::Which ............................................ ok
    GnuPG::Interface >= 1.02 ............................... ok (1.02)
    PerlIO::eol ............................................ ok

GRAPHVIZ dependencies:
    GraphViz ............................................... ok
    IPC::Run >= 0.90 ....................................... ok (20220807.0)

SMIME dependencies:
    Crypt::X509 ............................................ ok
    File::Which ............................................ ok
    String::ShellQuote ..................................... ok

SQLITE dependencies:
    DBD::SQLite >= 1.00 .................................... ok (1.70)


---------------------------------------------------------------------------

All dependencies found.
Install Request Tracker (RT) on Ubuntu 20.04/Ubuntu 22.04

You can now install Request Tracker (RT) on Ubuntu 20.04/Ubuntu 22.04;

make install
# Make the libraries readable
chmod 0755 /opt/rt5
chown -R root /opt/rt5/lib
chgrp -R root /opt/rt5/lib
chmod -R  u+rwX,go-w,go+rX /opt/rt5/lib
chmod 0755 /opt/rt5/bin
chmod 0755 /opt/rt5/etc
cd /opt/rt5/etc && chmod 0400 acl.Pg acl.Oracle acl.mysql schema.Pg schema.Oracle schema.mysql schema.SQLite cpanfile initialdata
#TODO: the config file should probably be able to have its
# owner set separately from the binaries.
chown -R root /opt/rt5/etc
chgrp -R www-data /opt/rt5/etc
chmod 0440 /opt/rt5/etc/RT_Config.pm
chmod 0640 /opt/rt5/etc/RT_SiteConfig.pm
# Make the system binaries
cd /opt/rt5/bin && ( chmod 0755 rt-mailgate rt rt-crontool ; chown root rt-mailgate rt rt-crontool;  chgrp www-data rt-mailgate rt rt-crontool)
# Make the system binaries executable also
cd /opt/rt5/sbin && ( chmod 0755 rt-attributes-viewer rt-munge-attachments rt-clean-sessions rt-dump-initialdata rt-dump-metadata rt-email-dashboards rt-email-digest rt-email-group-admin rt-externalize-attachments rt-fulltext-indexer rt-importer rt-ldapimport rt-passwd rt-preferences-viewer rt-search-attributes rt-serializer rt-server rt-server.fcgi rt-session-viewer rt-setup-database rt-setup-fulltext-index rt-shredder rt-test-dependencies rt-validator rt-validate-aliases standalone_httpd ; chown root rt-attributes-viewer rt-munge-attachments rt-clean-sessions rt-dump-initialdata rt-dump-metadata rt-email-dashboards rt-email-digest rt-email-group-admin rt-externalize-attachments rt-fulltext-indexer rt-importer rt-ldapimport rt-passwd rt-preferences-viewer rt-search-attributes rt-serializer rt-server rt-server.fcgi rt-session-viewer rt-setup-database rt-setup-fulltext-index rt-shredder rt-test-dependencies rt-validator rt-validate-aliases standalone_httpd;  chgrp www-data rt-attributes-viewer rt-munge-attachments rt-clean-sessions rt-dump-initialdata rt-dump-metadata rt-email-dashboards rt-email-digest rt-email-group-admin rt-externalize-attachments rt-fulltext-indexer rt-importer rt-ldapimport rt-passwd rt-preferences-viewer rt-search-attributes rt-serializer rt-server rt-server.fcgi rt-session-viewer rt-setup-database rt-setup-fulltext-index rt-shredder rt-test-dependencies rt-validator rt-validate-aliases standalone_httpd)
# Make upgrade scripts executable if they are in the source.
#
( cd etc/upgrade && find . -type f -not -name '*.in' -perm /0111 -print ) | while read file ; do \
	chmod a+x "/opt/rt5/etc/upgrade/$file" ; \
done
# Make the web ui readable by all. 
chmod -R  u+rwX,go-w,go+rX 	/opt/rt5/share/html \
				/opt/rt5/local/html \
				/opt/rt5/share/po \
				/opt/rt5/local/po \
				/opt/rt5/share/static \
				/opt/rt5/local/static
chown -R root 	/opt/rt5/share/html \
			/opt/rt5/local/html \
			/opt/rt5/share/po \
			/opt/rt5/local/po \
			/opt/rt5/share/static \
			/opt/rt5/local/static
chgrp -R root 	/opt/rt5/share/html \
			/opt/rt5/local/html \
			/opt/rt5/share/po \
			/opt/rt5/local/po \
			/opt/rt5/share/static \
			/opt/rt5/local/static
# 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.3/

Ensure the database service is running;

systemctl start mariadb
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 on Ubuntu 20.04/Ubuntu 22.04

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 FQDN.

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.

Install Request Tracker (RT) on Ubuntu 20.04

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 Ubuntu.

Ensure HTTP 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 welcome page site config;

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

To reset the password, follow the link below;

Reset Default Root Password on Request Tracker (RT)

Install Request Tracker (RT) on Ubuntu 20.04

Upon successful login, you land on RT Web interface.

Install Request Tracker (RT) on Ubuntu 20.04/Ubuntu 22.04

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 Ubuntu 20.04/Ubuntu 22.04.

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

Install ELK/Elastic Stack on Debian 10

Founder of itnixpro.com|Linux Engineer|Author at Itnixpro.com

7 thoughts on “Install Request Tracker (RT) on Ubuntu 20.04/Ubuntu 22.04”

  1. Thank you, Charles! This was super helpful! I was overwhelmed trying to do this on my own with all the dependencies and limited Linux knowledge. I’m just trying to setup a ticketing system for my class to practice on.

    Reply
  2. Not sure if I missed a step or did something out of place but when I went to enable my site and I tried browsing to it it didn’t work. I had to disable the default config file.

    Reply
  3. I have followed these instructions to a t and when i enable apache2 i the following page. I have reloaded the Ubuntu server twice, but still run into the same issue.

    “500 Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.

    More information about this error may be available in the server error log.”

    When i turn off apache2 and use the standalone server i can access the page just fine. The server error log does not give me anything to go off of. Any suggestions?

    Reply
    • I take that back i get these in the server error log.

      [Tue Oct 12 20:31:23.072227 2021] [authz_core:debug] [pid 4250:tid 140004424951552] mod_authz_core.c(817): [client x.x.x.x:53756] AH01626: authorization result of Require all granted: granted
      [Tue Oct 12 20:31:23.072280 2021] [authz_core:debug] [pid 4250:tid 140004424951552] mod_authz_core.c(817): [client x.x.x.x:53756] AH01626: authorization result of : granted
      [Tue Oct 12 20:31:23.072436 2021] [authz_core:debug] [pid 4250:tid 140004424951552] mod_authz_core.c(817): [client x.x.x.x:53756] AH01626: authorization result of Require all granted: granted
      [Tue Oct 12 20:31:23.072454 2021] [authz_core:debug] [pid 4250:tid 140004424951552] mod_authz_core.c(817): [client x.x.x.x:53756] AH01626: authorization result of : granted
      [Tue Oct 12 20:31:23.583505 2021] [fcgid:warn] [pid 4250:tid 140004424951552] (104)Connection reset by peer: [client x.x.x.x:53756] mod_fcgid: error reading data from FastCGI server
      [Tue Oct 12 20:31:23.583554 2021] [core:error] [pid 4250:tid 140004424951552] [client 10.250.0.231:53756] End of script output before headers: rt-server.fcgi

      Reply
  4. have the same issue: mod_fcgid: error reading data from FastCGI server

    inside this directory /var/log/rt5

    rt5.log is still root. Changed it to www-data and it was resolved.

    Encountered tar errors as well during make fixdeps for certain perl modules. Need to manually install them due to the tar fix as tar .tar.gz –no-same-owner

    i.e. tar -xvf Class-Accessor-Lite-0.08.tar.gz –no-same-owner

    then inside
    perl Makefile.PL
    make, make test, make install.

    Ubuntu 20.04 LTS
    RT 5.0.3, MariaDB, Apache2

    Reply

Leave a Comment