Ubuntu 13.04 Server and Request Tracker

From Request Tracker Wiki
Jump to navigation Jump to search
File:Placeholder

Based on the previous works of the others before me.

This is a Draft and will be updated over the weekend









Run the following command to gain root access:

sudo -i


Run the following command to install base packages:

apt-get update; apt-get install apache2 mysql-server mysql-client fetchmail mc postfix

say yes to the addtional installation items

apt-get install request-tracker4

say yes to the addtional installation items

Name your site when prompted.

Respond "Yes" to RT_SiteConfig.pm permissions when prompted.

Respond "Yes" to Configure RT with dbconfig-common when prompted.

Enter the MYSQL root password you used earlier in order to set up the new RT database when prompted.

Set the RT database access password (this password is for RT to connect to MYSQL & is stored in RT_SiteConfig.pm).

Request Tracker config file settings

Run the following command to back-up the RT config file:

cp /etc/request-tracker4/RT_SiteConfig.pm /etc/request-tracker4/RT_SiteConfig.pm.old

Run the following command to edit the RT config:

nano /etc/request-tracker4/RT_SiteConfig.pm

Comment out the following two lines with a # as shown below:

Set($CorrespondAddress , 'rt@tickets');

Set($CommentAddress , 'rt-comment@tickets');

Paste in the following two lines:

Set($MaxAttachmentSize , 10000000);

Set($FriendlyFromLineFormat, "\"%s\" <%s>");

Save the file.

Outbound Email config

Run the command:

nano /etc/postfix/main.cf

Find the line containing "relayhost" & add your smtp mail server

Save the file.

Run the command:

service postfix restart

Test Outbound mail (Postfix) by emailing a file – (This example sends /etc/fstab).

mailx -s "Postfix Test" YourOwnMailbox@domain < /etc/fstab

Use your own email address in the above command

Check your e-mail client to see if this is working.

Apache2 config

Run the command:

nano /etc/apache2/apache2.conf

Append the following at the bottom of the file on a new line:

ServerName tickets

Save the file & run the command:

nano /etc/apache2/sites-available/default  
nano /etc/apache2/sites-available/000-default.conf  (for Apache 13.10 and higher only)

Find the last line "</VirtualHost>" and paste in the following two lines just above it:

Include /etc/request-tracker4/apache2-modperl2.conf

RedirectMatch ^/$ /rt

Save the file.


Now run the command:

a2enmod rewrite; service apache2 restart


Apache fails to start once configured tor request-tracker, the error in the Apache logs is:

Can't locate Apache/DBI.pm


Cause: This error occurs because of the missing Apache::DBI Perl module.Workaround: Installing libapache-dbi-perl solves the problem.

Type: sudo apt-get install libapache-dbi-perl

now continue...

Configure RT from your web browser login

Log in to RT - Open your web browser, enter your RT IP address use default root login:

root:password

Navigate to: Configuration > Global > Group Rights

Find "Everyone" in "System Groups" and grant the following rights:

CommentOnTicket CreateTicket ReplyToTicket

Navigate to: Configuration > Queues > General

Set the "Reply Address" & "Comment Address" to IT-Support@yourdomain

Change “Description” to “IT-Support”

Use a valid email address for your domain.


Inbound e-mail config

Run the command:

nano /etc/default/fetchmail

Modify the last line to read:

START_DAEMON=yes

Run the command to open the editor & create a new blank file:

nano /etc/fetchmailrc

Paste in the following six lines:

set daemon 60
set invisible
set no bouncemail
set no syslog
set logfile /var/log/fetchmail.log
poll YOURMAILSERVER protocol pop3 username "IT-Support" password "secret" mda "/usr/bin/rt-mailgate --queue general --action correspond --url http://localhost/rt/" no keep

Note: the last line is long & may have wrapped in your display.

Run the command:

touch /var/log/fetchmail.log; chown fetchmail /var/log/fetchmail.log

Reboot.

To watch inbound email status, run the following command:

tail –f /var/log/fetchmail.log

Send an email to the account: IT-Support@yourdomain

Fetchmail should pick up this email within 60 seconds & forward it into RT. RT will then reply to you. You should see the ticket in the web console.

Note: Once you are happy that inbound email is working, comment out the set logfile line in /etc/fetchmailrc with a # & reboot.

Optional: install phpmyadmin to export/import the RTDB database to maintain backups.


Many thanks


John