Request Tracker 4 on Ubuntu 14.04 LTS

Request Tracker from Best Practical has been around for a while, and to a lot of people and organizations, a very robust and purpose-built ticketing system with a lot of flexibility. But, it’s not always the easiest thing to install. Sure, there are packages in common distros, but we don’t always want to rely on the distro/package maintainer to keep it current.

So, I’ve set out to give you a step-by-step on how to get Request Tracker 4 installed on an Ubuntu 14.04 LTS server. This will not be a tutorial on configuring / customizing RT4. That will come in a write-up to come at a later time. But, without anything further … let’s give it a whirl!

For the purposes of this write-up, we’ll use the following information which need to be changed to match your environment:

IP Address:

The first thing that you’ll want to do is install a basic Ubuntu 14.04 LTS system with SSH access (if it’s remote). Once you’ve done that, let’s ensure that it’s updated, and that our hostname is set properly. It’s best to start by sudo’ing to root:

# sudo su
{ enter user password to change to root user}

Now, let’s update the hosts file. If it doesn’t exist, add info for your host:

# nano -w /etc/hosts

Changing the hostname is as simple as editing the /etc/hostname file, removing anything in the file, and then typing in your hostname in FQDN format. Once changed, reboot your machine.

Now that we’ve gone that done, let’s update our machine:

# sudo su
# apt-get update
# apt-get upgrade
# apt-get dist-upgrade

Once you’ve verified that you want all of the updates provided, and installed the updates, let’s reboot one more time before getting started with RT4.

Now that your machine is back up, updated, and has the correct hostname, let’s get started with RT4. We’ll download the source for RT4 into the /usr/local/src directory and work from there.

# cd /usr/local/src
# wget
# tar -zxf rt.tar.gz

At the time of this writing, the version of RT4 that downloads is 4.2.11, so we’ll move into the RT4 directory and then install some dependencies before checking to see what’s missing:

# cd rt-4.2.11
# apt-get install build-essential openssl libyaml-0-2 libyaml-libyaml-perl libyaml-appconfig-perl libexpat1-dev \
apache2 mysql-server mysql-client exim4-daemon-light eximon4 mailutils libcurl4-openssl-dev
# ./configure
# make testdeps

After testing for dependencies, we’ll want to setup and update CPAN before fixing any missing dependencies.

# /usr/bin/perl -MCPAN -e shell

Answer YES to the two questions you’re asked:

Would you like to configure as much as possible automatically? [yes] Would you like me to automatically choose some CPAN mirror sites for you? (This means connecting to the Internet) [yes]

Once this completes, you’re at the CPAN shell where we’ll be able to update CPAN before continuing.

cpan[1]> install CPAN
cpan[2]> reload CPAN
cpan[3]> quit

With CPAN updated and configured, we can now run fixdeps to download and install perl dependencies. Grab some coffee and a muffin while this runs – it can take a bit, but keep an eye in case it needs your input.

# make fixdeps
# make testdeps

You should see a line that reads: All dependencies have been found. Now let’s get on with the install. To install in default locations:

# make install
# make initialize-database

Now comes the fun part – configuring Apache with FastCGI. Enabling the module and restarting Apache isn’t necessary, because it should happen when you run aptitude, but we’ll do it just to be sure.

# apt-get install libapache2-mod-fastcgi
# a2enmod fastcgi
# service apache2 restart

We’ll put together the configuration file for Apache:

# nano -w /etc/apache2/sites-available/001-requesttracker.conf

Copy and paste the following:

# Tell FastCGI to put its temporary files somewhere sane; this may
# be necessary if your distribution doesn't already set it
#FastCgiIpcDir /tmp

FastCgiServer /opt/rt4/sbin/rt-server.fcgi -processes 5 -idle-timeout 300

<VirtualHost *:80>
 ### Optional apache logs for RT
 # Ensure that your log rotation scripts know about these files
 # ErrorLog /opt/rt4/var/log/apache2.error
 # TransferLog /opt/rt4/var/log/apache2.access
 # LogLevel debug


 AddDefaultCharset UTF-8

 ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/

 DocumentRoot "/opt/rt4/share/html"
 <Location />
 #Order allow,deny
 #Allow from all
 Require all granted

 Options +ExecCGI
 AddHandler fastcgi-script fcgi

It’s recommended that if RT4 is the only site you have running on this machine, that you disable the default site. You can do this with:

# a2dissite 000-default.conf

Then, we’ll enable the Apache configuration for RT4:

# a2ensite 001-requesttracker.conf
# service apache2 restart

Now, let’s visit your site: You should see the RT4 login screen. The default username and password is: root/password – CHANGE IT.

To receive e-mail into your RT4 installation, we’ll need to make a change to Exim, and add some info to the /etc/aliases file. We’ll do that now. First, we’ll run an initial config on Exim:

# dpkg-reconfigure exim4-config

We’ll want to set Exim to be an Internet site with mail sent and received via SMTP (unless you send through a Smarthost – you’ll need to to configure Exim for that – but it’s not hard). Enter your system’s public IP address (or the IP address on your ethernet card when asked, and the domain you’re using if you’ll receive e-mail that is destined for this server only. When asked if you want to split the config into small files, I’d always recommend NO.

Now, we’ll want to create the file exim4.conf.localmacros and add a line:

# nano -w /etc/exim4.conf.localmacros

Add and save:


Restart Exim:

# service exim4 restart

Let’s add some lines to our /etc/aliases file:

# nano -w /etc/aliases

At the end of the file, add:

rt: "|/opt/rt4/bin/rt-mailgate --queue general --action correspond --url http://localhost"
rt-comment: "|/opt/rt4/bin/rt-mailgate --queue general --action comment --url http://localhost"

We should be all set with configuration … let’s give it a shot! If you were to send an e-mail to right now, RT will reject the e-mail because of settings in your queue. Before we get to those settings, lets make some adjustments to RT’s config file to ensure it’s working properly. In the /opt/rt4/etc/ file add/edit the following:

Set( $rtname, 'conflux' );
Set( $Organization, '' );
Set( $CorrespondAddress, '' );
Set( $CommentAddress, '' );
Set( $WebDomain, '' );

To fix this, let’s adjust the queue settings. Log in to your RT instance, hover over Admin -> Queues, and click Select. Once the page loads, click General, and then look on the far right and click Group Rights. On this page, set Everyone and Unprivileged to have the following options checked under the General tab:

Comment on tickets
Create tickets
Reply to tickets
View ticket summaries

Now, the last thing to do is to restart Apache:

# service apache2 restart

Send an e-mail to (remember to change this to your domain), and you should see a ticket created, and get an automated response from RT!

Coming soon will be some configuration of RT, and how I’ve been working to integrate it into a project I’m working on now. Stay tuned!