Install Request Tracker
Since covering an install of Request Tracker 4 on Debian (Part 1/2, 2/2), my most common request has been a guide for Ubuntu. A lot of the material is the same, since Ubuntu is a derivative of Debian.
This guide assumes you are installing a fresh install of Ubuntu 12.04 LTS Server onto a new computer or virtual machine. I have chosen the latest LTS release as it will be supported for far longer than regular releases. These instruction should also work on any version of Ubuntu released after 11.10 (minor changes may be required).
Feel free to change settings to suit your environment and use your favorite text editor (vi, emacs, butterflies etc) instead of nano.
You will need to have a few basic things before proceeding:
- Spare server (or VM) with 1GB+ RAM and at least 9GB HDD (more is better)
- Email account for RT (I have used email@example.com)
- Email account for RT comments (I used firstname.lastname@example.org)
- A basic understanding of Linux, networking etc
- Select Language (English)
- Install Ubuntu Server
- Select Language (English)
- Select your location
- Detect keyboard layout (No)
- Select Keyboard Layout
- Edit the Hostname (rt)
- Create your non-root account
- Encrypt your home directory
- Configure the clock
- Partition Disks
- Wait while the base system installs (make a coffee..)
- Configure proxy if required
- Wait while the installer runs a few tasks
- Configuring tasksel (Install security updates automatically)
- Software selection (OpenSSH Server – we will add the rest later)
- Wait while the installer downloads and installs packages
- Install the GRUB boot loader
- Finish install, computer reboots, remove CD
Configure a Static IP address and DNS resolution
sudo nano /etc/network/interfaces
Change the following two lines from:
allow-hotplug eth0 iface eth0 inet dhcp
To suit your environment:
auto eth0 iface eth0 inet static address 192.168.1.100 broadcast 192.168.1.255 gateway 192.168.1.1 dns-nameservers 192.168.1.1
Restart networking and test:
sudo /etc/init.d/networking restart ping google.com
Not covered here, but now is a good time to configure SSH (preferably using certificates). Continuing the install using SSH from your desktop/laptop will make it easier to copy/paste config files. On Windows I highly recommend PuTTY.
Install Required Packages
Update your available packages, install Request Tracker 4, Apache 2, PostgreSQL and the lynx browser:
sudo aptitude update sudo aptitude install request-tracker4 \ rt4-apache2 rt4-clients rt4-db-postgresql apache2-doc lynx \ postgresql apache2 libapache-dbi-perl fetchmail
You now need to configure some basic RT settings:
- Name for this RT Instance ($rtname) – example.com (pick something unique to your organization like your domain name)
- Handle RT_SiteConfig.pm Permissions – Yes
- More stuff installs.. (time for more coffee)
- Configure database for request-tracker4 with dbconfig-common – Yes
- Set the PostgreSQL application password for request-tracker4
- Set the RT root password (note that this is not the system root user)
- More stuff installs..
You can choose any MTA you want but I have decided to keep the Ubuntu default of Exim4.
Please note that your email setup may be different and require additional configuration. For example if you use Google Apps you will need to configure authentication and SSL. I have added a couple of links at the end of this page with further information.
To reconfigure Exim:
sudo dpkg-reconfigure exim4-config
Configure Exim4 to work in your environment:
- Select: mail sent by smarthost; received by SMTP or fetchmail
- System mail name: example.com
- IP-addresses to listen on for incoming SMTP connections: leave at default
- Other destinations for which mail is accepted: leave at default
- Machines to relay mail for: leave blank
- IP address or hostname of the outgoing smarthost: smtp.isp.com
- Hide local mail name in outgoing mail?: Yes
- Visible domain name for local users: example.com
- Keep number of DNS-queries minimal (Dial-on-Demand): No
- Delivery method for local mail: mbox format in /var/mail (default)
- Split configuration into small files: No
Test outbound mail by emailing a file to yourself (edit to suit):
mailx -s "Exim4 email Test" email@example.com < /etc/fstab
Check your e-mail to see if this is working. If the email doesn’t come through in a few minutes you might want to check the Exim4 configuration.
Basic RT Configuration
Edit the RT config file
sudo nano /etc/request-tracker4/RT_SiteConfig.pm
Find and edit the following lines from:
Set($CorrespondAddress , 'firstname.lastname@example.org'); Set($CommentAddress , 'email@example.com');
Set($CorrespondAddress , 'firstname.lastname@example.org'); Set($CommentAddress , 'email@example.com');
Also paste the following lines to the end of the file, just above the last comment block, then save and exit:
Set($MaxAttachmentSize , 10000000); Set($FriendlyFromLineFormat, "\"%s\" <%s>");
Edit the apache2 default available sites:
sudo nano /etc/apache2/sites-available/default
Find the end of the file “</VirtualHost>” and add the following line just above it:
Include /etc/request-tracker4/apache2-modperl2.conf RedirectMatch ^/$ /rt
Save the file and exit.
To enable mod_rewrite run the command:
sudo a2enmod rewrite
And then restart apache2:
sudo service apache2 restart
RT Web Configuration
You should now be able to see the RT Web Login Screen (http://rt.example.com/rt/) and be able to login with the username “root” and the password configured during installation (note. this is the root user for RT not your system).
You can now edit the configuration for the queue. Change the Description as this will appear as the senders name in emails from the queue.
When you are happy with the queue settings click on Group Rights (top right-hand corner):
As below make sure Everyone is selected before ticking the boxes next to:
- Comment on tickets
- Create tickets
- Reply to tickets
and then click Save Changes.
Enable the fetchmail daemon to start:
sudo nano /etc/default/fetchmail
Modify the last line and save:
Create a new fetchmailrc config file and edit it:
sudo nano /etc/fetchmailrc
Paste the following lines into fetchmailrc and edit to suit:
set daemon 60 set invisible set no bouncemail set syslog poll pop3.example.com protocol pop3 username "firstname.lastname@example.org" password "password" mda "/usr/bin/rt-mailgate --queue general --action correspond --url http://localhost/rt/" no keep ; poll pop3.example.com protocol pop3 username "email@example.com" password "password" mda "/usr/bin/rt-mailgate --queue general --action comment --url http://localhost/rt/" no keep ;
Important: If you changed the Queue Name during RT Web Configuration, you need to modify the queue name in fetchmailrc or incoming email will not work.
Restart the RT host:
sudo shutdown -r now
While you are waiting send an email to RT (eg firstname.lastname@example.org) from your email account.
Once the server is back fetchmail should retrieve the email within 60 seconds & forward it to RT. You will then get an email reply and the newly created ticket should appear in the web interface.
There are a few jobs which you will want to run regularly. The easiest way is to add these to cron:
sudo crontab -e
Add the following lines then save and exit:
0 0 * * * /usr/sbin/rt-email-digest -m daily 0 0 * * 0 /usr/sbin/rt-email-digest -m weekly 0 * * * * /usr/sbin/rt-email-dashboards
Request Tracker should now be running and tickets can be received. You should create a group for your IT team with increased permissions to the queue, and add your team members to it. I also strongly recommend establishing a regular backup schedule for at least the RT database.
Over the next few months I will try to add more RT content including adding queues, integrating with an AD domain, and enabling fast full-text searching.
Request Tracker Links