Makerere University

Enter a keyword or two into the search box above and click search..

Insalling Request Tracker on Ubuntu

You are here

This is a compilation of procedures from different authors/websites into one complete procedure. Sources are included at the end of this article. (Last updated Mar 12 2017). This assumes you already have the instance of Ubuntu Webserver running on your server.

1. I’ve already gone through and figured out the package dependancies:

apt-get install build-essential mysql-server apache2 postfix mailutils openssl libyaml libyaml-appconfig-perl openssl-dev libexpat1-dev


apt-get install make apache2 libapache2-mod-fcgid libssl-dev libyaml-perl libgd-dev libgd-gd2-perl libgraphviz-perl

2. Download the latest version of RT from the author’s website, Best Practical. gunzip and extract the tar file, cd into your home or any other created directory.

cd /home/mydirectory
gunzip rt.tar.gz
tar -xvf rt.tar

3. Login again, become root and cd into /home/mydirectory

4. We will be running the configure script with a number of default and explicit options. Since we haven't defined it otherwise, our install path location will be /opt/rt4.

You’re advised to first see the configure options available by typing

./configure —-help

Choose the options you’d want to configure and proceed

./configure --with-web-user=www-data --with-web-group=www-data --enable-graphviz --enable-gd

I often use the —prefix=/the-path-to-the-directory-i-want

5. The installation of RT requires we enter the Perl shell before running the RT dependency checker. Within the shell, we will set the configuration to automate the majority of the module installs.

/usr/bin/perl -MCPAN -e shell 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] <enter>
Would you like me to automatically choose some CPAN mirror
sites for you? (This means connecting to the Internet) [yes] <enter>
cpan[1]> o conf prerequisites_policy follow
cpan[2]> o conf build_requires_install_policy yes
cpan[3]> o conf commit
cpan[4]> q

Now let’s see what’s missing:

make testdeps

‘make fixdeps’ will install all the CPAN modules:

make fixdeps

Test again to see that all dependancies have been met:

make testdeps

if successful, at the end of the output, you will be able to see

All dependencies have been found.

Install RT and initialize RT database

sudo make install

Congratulations. RT is now installed.
You must now configure RT by editing /opt/rt4/etc/

(You will definitely need to set RT's database password in
/opt/rt4/etc/ 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'

Let's now run the following command to create the RT database and user. Enter the MySQL root password when prompted.

sudo make initialize-database

/usr/bin/perl -I/opt/rt4/local/lib -I/opt/rt4/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: <your_MySQL_root_password>
Working with:
Type: mysql
Host: localhost
Name: rt4
User: rt_user
DBA: root
Now creating a mysql database rt4 for RT.
Now populating database schema.
Now inserting database ACLs.
Granting access to rt_user@'localhost' on rt4.
Now inserting RT core system objects.
Now inserting data.
Done inserting data.

Links to help in this section

Configure Apache for RT

Set HTTP to HTTPS redirect for all incoming HTTP requests.

Debian: The 000-default.conf file is named default.

$ sudo vi /etc/apache2/sites-available/000-default.conf

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        Redirect /

        #ServerAdmin webmaster@localhost
        #DocumentRoot /var/www

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined


Create the rt site configuration file.

Debian: The default-ssl.conf file is named default-ssl, and also remove the .conf extension for the rt.conf filename (e.g. rt.conf -> rt).

$ sudo cp /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-available/rt.conf

Edit the rt site configuration file.

Debian: Take note of the Location container in regards to Apache version differences. Modify accordingly.

$ sudo vi /etc/apache2/sites-available/rt.conf

<IfModule mod_ssl.c>
        <VirtualHost _default_:443>   
                # Request Tracker
                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 />
                    ## Apache version < 2.4 (e.g. Debian 7.2)
                    #Order allow,deny
                    #Allow from all
                    ## Apache 2.4
                    Require all granted
                <Directory "/opt/rt4/sbin">
                    SSLOptions +StdEnvVars

                # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
                # error, crit, alert, emerg.
                # It is also possible to configure the loglevel for particular
                # modules, e.g.
                #LogLevel info ssl:warn

                ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined

Enable the ssl and fcgid modules. Note the fcgid module may already be enabled.

$ sudo a2enmod ssl fcgid
Considering dependency setenvif for ssl:
Module setenvif already enabled
Considering dependency mime for ssl:
Module mime already enabled
Considering dependency socache_shmcb for ssl:
Enabling module socache_shmcb.
Enabling module ssl.
See /usr/share/doc/apache2/README.Debian.gz on how to configure SSL and create self-signed certificates.
Module fcgid already enabled
To activate the new configuration, you need to run:
  service apache2 restart

Enable the rt site.

$ sudo a2ensite rt
Enabling site rt.
To activate the new configuration, you need to run:
  service apache2 reload file
Request Tracker is very customizable, but the following base configuration settings should get you started.

$ sudo vi /opt/rt4/etc/

# You must restart your webserver after making changes to this file.

Set( $rtname, '');
Set( $Organization, '');
Set( $Timezone, 'US/Pacific');
Set( $WebDomain, '');
Set( $WebPort, 443);
Set( $WebPath, '');

# You must install Plugins on your own, this is only an example

Restart Apache.

$ sudo service apache2 restart
* Restarting web server apache2                                         [ OK ]

Moment of truth

Open a web browser and enter (or into the web address field, and then press the enter key to establish a secure connection to the RT server. If everything has been installed and configured correctly, you should be presented with the RT Login page.

The default administrative credentials are:
Username: root
Password: password