Installing Request Tracker(RT) can be a real pain sometimes. This is due to all the dependencies required and the vast variety of systems it can be installed on. I will be showing you how you can install Request Tracker 4.4.4 on Ubuntu 18.04. If you have any questions feel free to leave them in the comments below

To start off I will install a new ubuntu 18.04 virtual machine and give it a static IP address of 192.168.178.203 and make sure it is fully up to date. If you need help on setting a static ip you can click here

First I will use sudo to switch to the root user

sudo -i

Next, I will install the required packages for the install by running the following command

apt-get install libgd-dev libgnupg-interface-perl libgraphviz-dev graphviz autoconf apache2 libapache2-mod-fcgid expat openssl libssl-dev mysql-server make libmysqlclient-dev

I will then set the root password for MySQL by running the following:

mysql_secure_installation

It will first prompt you to change the root password. For the purpose of this tutorial I will be setting it to “MySQLRootPass!”. It will then go on to ask you various questions which you can answer yes to.

For RT to not have any errors when finding and install all it’s Perl dependencies it is a good idea to install a new instance of Perl. We will download pearl, extract it, configure the install directory, then install it.

A newer version of Perl may be available, got to http://www.cpan.org/src/ to check
cd /tmp
wget https://www.cpan.org/src/5.0/perl-5.30.2.tar.gz
tar -xzf perl-5.30.2.tar.gz
cd perl-5.30.2
./Configure -des -Dprefix=/opt/perl5
make
make test
make install

Once Perl has installed we will need to tell our system to use this version. Then we use which Perl to check we are using the correct version

export PATH=/opt/perl5/bin:$PATH
which Perl

We will next install CPAN minus which is what RT uses to install its Perl dependencies. The below commands will compile and install CPAN minus

cd /tmp
wget https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz
tar -xzf App-cpanminus-1.7044.tar.gz
cd App-cpanminus-1.7044
/opt/perl5/bin/perl Makefile.PL
make
make test
make install

The final step in the Pearl / CPAN install is to tell RT to use it.

export RT_FIX_DEPS_CMD='/opt/perl5/bin/cpanm'

Now it is time to download and install request tracker. First, we will download and extract the file

cd /tmp
wget http://download.bestpractical.com/pub/rt/release/rt.tar.gz
tar xf rt.tar.gz
cd /tmp/rt-*

Then we will tell RT what additional install options we want. I will be selecting Graphviz and gd. These are both used in RT for reporting charts. (More options can be found here https://docs.bestpractical.com/rt/4.4.4/configure.html)

./configure --enable-graphviz --enable-gd

Now we will need to check what Perl dependencies are missing from the server. You will most likely be missing most of these at the moment.

make testdeps

Due to a bug with the module GnuPG::Interface we need to force the install with the following command

cpanm GnuPG::Interface --force

The next command can take a while to run, once it’s going best to go and make a cuppa. BUT make sure you keep an eye on it, it will require user input at times but all you will need to answer is yes. Once the command has run successfully it will say: All dependencies have been found.

You may need to run this command multiple times before all the dependencies are found.
make fixdeps

Finally time to install RT. This is a simple as running the following command. but we are a long way from having a fully configured RT system yet.

make install

Next up is to configure the database, you will be prompted to enter your MySQL root password that you set up earlier.

make initialize-database

You can now give RT a quick test by running /opt/rt4/sbin/rt-server --port 8080 Then if you browse to the IP address of the server, in my case this will be http://192.168.178.203:8080 and you should be able to see the RT web interface. To stop the internal server by pressing Ctrl + C

Apache2 now needs setting up. First, we will create a new blank virtual host

touch /etc/apache2/sites-available/rt.conf

Next we will edit the file we just created

nano /etc/apache2/sites-available/rt.conf

Then enter in the below information. This is only a basic virtual host to get RT working. It will need to be modified to suit your needs

<VirtualHost *:80>
         ErrorLog /opt/rt4/var/log/apache2.error
         TransferLog /opt/rt4/var/log/apache2.access
         LogLevel debug
         AddDefaultCharset UTF-8
         DocumentRoot /opt/rt4/share/html
         Alias /NoAuth/images/ /opt/rt4/share/html/NoAuth/images/
         ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/
         <Location />
             Require all granted
         </Location>
</VirtualHost>

We now need to enable the RT.conf site config, and verify that we have all the correct settings. I will also disable the default site as it is not needed

a2ensite rt
a2dissite 000-default
apachectl configtest
systemctl restart apache2

That is it, RT is now installed. you can go to your server and login with the default credentials which are root/password. There is still a bit more to configure in RT before it is ready to use in production and I will cover next.

Pretty much all the configuration in RT is done via the RTSite_Config.pm file. I will go through the basic settings you need change for RT to work correctly.

Set( $rtname, ‘Sam’s Tech Blog’); – This setting is used throughout RT and is normally set to your company name

Set( $Organization, ‘samtechblog.co.uk’); – This is your company website which is displayed on the top right-hand side of every page

Set( $Timezone, ‘Europe/London’); – This is the time zone that RT will use

Set( $WebDomain, ‘rt.samtechblog.co.uk’); – This is the address that your RT server uses, if you are not using a domain name you can put the IP address here.

Set( $WebPort, 80); – You can change the port that RT runs on but you will also need to amend the Apache virtual host.

Once you and customised the above options and then entered them into your config file you are ready to go! There are 100s more options you can add into your config file which you can find here https://docs.bestpractical.com/rt/4.4.4/RT_Config.html

One of the mail features of RT is sending and reciving emails, as this isn’t essential I haven’t included it here but you can view the tutorial at the link below:

Setup fetchmail & Postfix for Request Tracker on Ubuntu 18.04

Sam

About the Author

23 year old computer nerd with a passon for open source technologies. With 6 years in the IT industry ranging from Legal, Education and Events

View Articles