Difference between revisions of "HowToInstallRequestTracker3.8OnUbuntu11.04"

From Request Tracker Wiki
Jump to navigation Jump to search
m (11 revisions imported)

Latest revision as of 16:11, 6 April 2016

Unofficial Installation Guide

This is an unofficial installation guide. It may be outdated or apply only to very specific configurations and versions. The official and maintained installation steps for RT are in the README and UPGRADING documents included in the official .tar.gz packages.

This page 'HowToInstallRequestTracker3.8OnUbuntu11.04' is tagged as OUTDATED
This page contains out of date and possibly misleading information or instructions such as installation methods or configuration examples that no longer apply. Please consider this warning when reading the page below.
If you have checked or updated this page and found the content to be suitable, please remove this notice by editing the page and remove the Outdated template tag.

HowTo Install RT 3.8 with MySQL on Ubuntu 11.04 Server

DRAFT; IN-PROCESS REVISION OF HowTo Install Request-Tracker 3.8 on ubuntu 9.10 and MySQL

This How-To will explain how to install request-tracker on a clean Ubuntu Server 11.04 64-bit install. It is tested on Ubuntu 11.04 with LOCAL and REMOTE MySQL databases. These tests were done using FULLY VIRTUALIZED servers running under VirtualBox4.1.0

It also installs the additional services required for Request-Tracker:

  • MySql - Database to Store the RT information.
  • Postfix - Email Server (for sending emails)
  • Apache2 - Web Server
  • Configuration for using a MySQL database on another local server.

Ubuntu Server

Install Ubuntu Server

  1. Boot from ISO or DVD.
  2. Accept all defaults plus...
  3. Software Selection:
    1. OpenSSH server
    2. LAMP server
    3. Mail server
  4. Assign password for MySQL "root" user.
  5. Repeat password
  6. Accept remaining defaults and reboot

Update and Upgrade

  1. Logon via SSH to make cut-and-paste easier
  2. Make sure you have the latest software
    sudo apt-get update
    sudo apt-get upgrade


Install MySql with PERL interface

MySQL Server should already be installed if you selected LAMP server above. If not...

  1. sudo apt-get install mysql-server
  2. sudo apt-get install libdbd-mysql-perl

Install MySQL libraries for RT 3.8

  1. sudo apt-get install rt3.8-db-mysql


Install PERL libraries for Apache

  1. sudo apt-get install libapache-dbi-perl

Install RT 3.8 libraries for Apache

sudo apt-get install rt3.8-apache2

Mail Server

Install Postfix mail server (SMTP Server)

  1. sudo apt-get install postfix
  2. Choose "Internet Site" in the install dialogue.
  3. Accept or correct the name of the mail server
    e.g. rt.server.yourdomain.com

Request Tracker 3.8 Itself

Install RT server and client

  1. sudo apt-get install request-tracker3.8 rt3.8-clients

NOTE: RT default install DIR is /usr/share/request-tracker3.8/

Name Your RT instance

This is something you won't ever want to change. It will appear in the subject of EVERY piece of mail RT sends out, and most of the mail your users will send in as well. It will be shown on every RT screen in the title "RT for {rt_name}". Pick carefully!

  1. Enter something like mydomain.com or rt.mydomain

Baseline Configuration of Your RT Instance

  1. Answer "Yes" to "Handle RT_SiteConfig.pm permissions?"
  2. Answer “No” to "Configure database for request-tracker3.8 with dbconfig-common?"

Additional Configuration of Your RT Instance

NOTE: Many of the install guides specify direct modification of RT_SiteConfig.pm. This is no longer the correct method for configuration updates! Instead you should use the following method for all RT configuration updates:

  1. Go to the RT_SiteConfig.d directory
    cd /etc/request-tracker3.8/RT_SiteConfig.d
  2. Modify one or more of the configuration files in that directory, e.g.:
    sudo vim 40-timezone or sudo nano 40-timezone
    sudo vim 50-debconf
    sudo vim 51-dbconfig-common
    sudo vim 90-local Put your own special configuration elements in this file.
  3. Backup the RT_SiteConfig.pm file
    cd ..
    sudo cp RT_SiteConfig.pm RT_SiteConfig.pm.orig
  4. Re-generate the RT_SiteConfig.pm file
    sudo update-rt-siteconfig-3.8

Check/Modify Basic Configuration

  1. Enter the configuration directory
    cd /etc/request-tracker3.8/RT_SiteConfig.d
  2. Look at the basic configuration file (press "q" to exit)
    sudo less 50-debconf
  3. Modify if needed
    sudo cp 50-debconf 50-debconf.orig
    sudo vim 50-debconf

To eliminate an extra (for me) "/rt" in the URL, I change the WebPath as follows:

FROM: Set($WebPath , "/rt");
TO:   Set($WebPath , "");

So my 50-debconf file looks like this:


Set($rtname, 'dev.mydomain.com');
Set($Organization, 'rt.mydomain.com');

Set($CorrespondAddress , 'rt@rt.mydomain.com');
Set($CommentAddress , 'rt-comment@rt.mydomain.com');


Set($WebPath , "");
Set($WebBaseURL , "http://rt.mydomain.com");

Check/Modify Database Configuration

  1. Enter the configuration directory
    cd /etc/request-tracker3.8/RT_SiteConfig.d
  2. Look at the basic configuration file (press "q" to exit)
    sudo less 51-dbconfig-common
  3. Modify if needed
    sudo cp 51-dbconfig-common 51-dbconfig-common.orig
    sudo vim 51-dbconfig-common

To use MySQL on localhost, my 51-dbconfig-common file looks like this::

# generated by dbconfig-common
# Updated to use MySQL only

# map from dbconfig-common database types to their names as known by RT
# my %typemap = (
#    mysql   => 'mysql',
#    pgsql   => 'Pg',
#    sqlite3 => 'SQLite',
# );

# Set($DatabaseType, $typemap{} || "UNKNOWN");
Set($DatabaseType, 'mysql');

# Values for a LOCALHOST database:
Set($DatabaseHost, 'localhost');
Set($DatabasePort, '');

# Set($DatabaseHost, 'dbhostname');
# Set($DatabasePort, '3306');

Set($DatabaseUser , 'rtuser');
Set($DatabasePassword , 'rtdbpasswd');

# SQLite needs a special case, since $DatabaseName must be a full pathname
# my $dbc_dbname = ''; if ( "" eq "sqlite3" ) { Set ($DatabaseName, '' . '/' . $dbc_dbname); } else { Set ($DatabaseName, $dbc_dbname); }

my $dbc_dbname = 'rtdb';
Set ($DatabaseName, $dbc_dbname);

Create New RT_SiteConfig.pm File

  1. Backup the RT_SiteConfig.pm file
    cd ..
    sudo cp RT_SiteConfig.pm RT_SiteConfig.pm.orig
  2. Re-generate the RT_SiteConfig.pm file
    sudo update-rt-siteconfig-3.8

Create the Database

  1. Use script to create database (don’t worry about user error message we will fix this later)
    sudo /usr/sbin/rt-setup-database --action init --dba root --prompt-for-dba-password
  2. On your database host, login to MySQL as root
    mysql -uroot -p
  3. Create user properly
    CREATE USER rtuser IDENTIFIED BY 'rtdbpasswd';
  4. Grant access rights to rtuser
    • If using a remote database host, replace "localhost" (below) with the name of your RT host.
    GRANT ALL PRIVILEGES ON rtdb.* TO 'rtuser'@'localhost' IDENTIFIED BY 'rtdbpasswd';
  5. Drop the database
    mysqladmin drop rtdb -p
  6. Back on the RT host, recreate the database using the script (it should work this time)
    sudo /usr/sbin/rt-setup-database --action init --dba root --prompt-for-dba-password

Update Apache Configs (basic)

NOTE: These instructions provide basic connectivity via Apache. They do not cover advanced connectivity elements such as SSL, use of conf.d directory, etc.

Add RT PERL module to Apache

  1. Backup apache configuration file
    sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/default.orig
  2. Open the Apache default configuration file for editing
    sudo vim /etc/apache2/sites-available/default
  3. Add the following line to the VirtualHost section of Apache from which you wish to serve RT
    (Paste at the end of the file just before the closing </VirtualHost> tag.)
    Include /etc/request-tracker3.8/apache2-modperl2.conf
    RedirectMatch ^/$ /rt
  4. Add the module
    sudo a2enmod rewrite

Restart Apache

  1. This might work the first time:
    sudo service apache2 restart
  2. If you get an error, there is a PERL module missing. Install it:
    sudo apt-get install libapache-dbi-perl
  3. Try again -- it should work now.
    sudo /etc/init.d/apache2 restart

Start using Request Tracker

Now you are ready to logon to Request Tracker on 'http://yourdomain.com/rt' using

User: root

Password: password

And you are on your way, have fun :-).