Difference between revisions of "Ubuntu 13.04 Server and Request Tracker"

From Request Tracker Wiki
Jump to navigation Jump to search
(Draft)
 
Line 1: Line 1:
[[File:Placeholder|video|right|300px]] [[File:Placeholder|right|300px]]  
[[File:Placeholder|right|300px]]  
Based on the previous works of the others before me.
Based on the previous works of the others before me.


==Section heading==
This is a Draft and will be updated over the weekend


Write the first section of your page here.


==Section heading==


Write the second section of your page here.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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|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|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|RT_SiteConfig]].pm /etc/request-tracker4/[[RT SiteConfig|RT_SiteConfig]].pm.old
 
Run the following command to edit the RT config:
 
nano /etc/request-tracker4/[[RT SiteConfig|RT_SiteConfig]].pm
 
Comment out the following two lines with a # as shown below:
Set($[[CorrespondAddress]] , '[mailto:rt@tickets rt@tickets]');
Set($[[CommentAddress]] , '[mailto:rt-comment@tickets 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" [mailto:YourOwnMailbox@domain 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
 
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.
 
Apache fails to start once configured tor request-tracker, the error in the Apache logs is:
 
Can't locate Apache/DBI.pm
 
 
 
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; width: auto; max-width: 45em; color: rgb(51, 51, 51); font-family: UbuntuBeta Mono, Ubuntu Mono, monospace; font-size: 12px; line-height: 18px;">Cause: This error occurs because of the missing Apache::DBI Perl module.Workaround: Installing libapache-dbi-perl solves the problem.</p>
 
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; width: auto; max-width: 45em; color: rgb(51, 51, 51); font-family: UbuntuBeta Mono, Ubuntu Mono, monospace; font-size: 12px; line-height: 18px;">Type: sudo apt-get install libapache-dbi-perl</p>
 
 
 
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; width: auto; max-width: 45em; color: rgb(51, 51, 51); font-family: UbuntuBeta Mono, Ubuntu Mono, monospace; font-size: 12px; line-height: 18px;">now continue...</p>
 
 
 
Now run the command:
 
a2enmod rewrite; service apache2 restart
 
==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'''" &amp; "'''Comment Address'''" to [mailto:IT-Support@yourdomain 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 &amp; 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/ http://localhost/rt/"] no keep
 
Note: the last line is long &amp; 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: [mailto:IT-Support@yourdomain IT-Support@yourdomain]
 
Fetchmail should pick up this email within 60 seconds &amp; 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 # &amp; reboot.
 
Optional: install phpmyadmin to export/import the RTDB database to maintain backups.
 
Cheers,
 
[[ChrisM]].

Revision as of 10:08, 16 August 2013

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

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.

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...


Now run the command:

a2enmod rewrite; service apache2 restart

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.

Cheers,

ChrisM.