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

or

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
wget https://download.bestpractical.com/pub/rt/release/rt.tar.gz
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 CPAN.pm 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

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] <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/RT_SiteConfig.pm.

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

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
Port:
Name: rt4
User: rt_user
DBA: root
Now creating a mysql database rt4 for RT.
Done.
Now populating database schema.
Done.
Now inserting database ACLs.
Granting access to rt_user@'localhost' on rt4.
Done.
Now inserting RT core system objects.
Done.
Now inserting data.
Done inserting data.
Done.

Links to help in this section

https://rt-wiki.bestpractical.com/wiki/DebianLennyInstallGuide

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.
        ServerName rt.corp.example.com:80
        Redirect / https://rt.corp.example.com/

        #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
                ServerName rt.corp.example.com:443
                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
                </Location>
                <Directory "/opt/rt4/sbin">
                    SSLOptions +StdEnvVars
                </Directory>

                # 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

RT_SiteConfig.pm file
Request Tracker is very customizable, but the following base configuration settings should get you started.

$ sudo vi /opt/rt4/etc/RT_SiteConfig.pm

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

Set( $rtname, 'example.com');
Set( $Organization, 'corp.example.com');
Set( $Timezone, 'US/Pacific');
Set( $WebDomain, 'rt.corp.example.com');
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 http://rt.corp.example.com (or https://rt.corp.example.com) 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

Links

  1. http://binarynature.blogspot.ug/2013/10/install-request-tracker-4-on-ubu...
  2. http://thomasmullaly.com/2014/11/28/request-tracker-4-dot-2-dot-9-instal...
  3. http://howtoconfigure.blogspot.ug/2013/05/how-to-install-request-tracker...
Category: