{"id":54,"date":"2012-02-10T20:05:41","date_gmt":"2012-02-10T07:05:41","guid":{"rendered":"http:\/\/burn.co.nz\/blog\/?p=54"},"modified":"2013-09-08T13:39:08","modified_gmt":"2013-09-08T00:39:08","slug":"installing-rt-4-on-debian-22","status":"publish","type":"post","link":"https:\/\/burn.co.nz\/blog\/?p=54","title":{"rendered":"Installing Request Tracker 4 on Debian (2\/2)"},"content":{"rendered":"<p><strong>Continued from <a title=\"Installing RT 4 on Debian (1\/2)\" href=\"http:\/\/burn.co.nz\/blog\/?p=13\"> Part 1\/2<\/a><\/strong><\/p>\n<p>Previously we covered installing Debian and configuring some basics. This time we dig into installing Request Tracker 4 and making it work.<\/p>\n<h2>Install Required Packages<\/h2>\n<p>Edit your APT sources file:<\/p>\n<p><!--more--><\/p>\n<pre>sudo nano \/etc\/apt\/sources.list<\/pre>\n<p>Add the lines below and save:<\/p>\n<pre># wheezy-backports\r\ndeb http:\/\/ftp.debian.org\/debian\/ wheezy-backports main<\/pre>\n<p>Update your available packages, install Request Tracker 4, Apache 2, PostGreSQL and lynx:<\/p>\n<pre>sudo aptitude update\r\nsudo aptitude -t wheezy-backports install request-tracker4 \\\r\n rt4-apache2 rt4-clients rt4-db-postgresql apache2-doc lynx \\\r\n\u00a0postgresql apache2 libapache-dbi-perl fetchmail<\/pre>\n<p>You now need to configure some basic RT settings:<\/p>\n<ul>\n<li>Name for this RT Instance ($rtname) &#8211; example.com (pick something unique to your organization like your domain name)<\/li>\n<li>Handle RT_SiteConfig.pm Permissions &#8211; Yes<\/li>\n<li>More stuff installs.. (time for more coffee)<\/li>\n<li>Configure database for request-tracker4 with dbconfig-common &#8211; Yes<\/li>\n<li>Set the PostgreSQL application password for request-tracker4<\/li>\n<li>Initial root password for RT system<\/li>\n<li>More stuff installs..<\/li>\n<\/ul>\n<h2>Email Configuration<\/h2>\n<p>You can choose any MTA you want but I have decided to keep the Debian default of Exim4.<\/p>\n<p>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.<\/p>\n<p>To reconfigure Exim:<\/p>\n<pre>sudo dpkg-reconfigure exim4-config<\/pre>\n<p>Configure Exim4 to work in your environment:<\/p>\n<ul>\n<li>Select: mail sent by smarthost; received by SMTP or fetchmail<\/li>\n<li>System mail name: example.com<\/li>\n<li>IP-addresses to listen on for incoming SMTP connections: leave at default<\/li>\n<li>Other destinations for which mail is accepted: leave at default<\/li>\n<li>Machines to relay mail for: leave blank<\/li>\n<li>IP address or hostname of the outgoing smarthost: smtp.isp.com<\/li>\n<li>Hide local mail name in outgoing mail?: Yes<\/li>\n<li>Visible domain name for local users: example.com<\/li>\n<li>Keep number of DNS-queries minimal (Dial-on-Demand): No<\/li>\n<li>Delivery method for local mail: mbox format in \/var\/mail (default)<\/li>\n<li>Split configuration into small files: No<\/li>\n<\/ul>\n<p>Test outbound mail by emailing a file to yourself (edit to suit):<\/p>\n<pre>mailx -s \"Exim4 email Test\" you@example.com &lt; \/etc\/fstab<\/pre>\n<p>Check your e-mail to see if this is working. If the email doesn&#8217;t come through in a few minutes you might want to check the Exim4 configuration.<\/p>\n<h2>Basic RT Configuration<\/h2>\n<p>Edit the RT config file<\/p>\n<pre>sudo nano \/etc\/request-tracker4\/RT_SiteConfig.pm<\/pre>\n<p>Find and edit the following lines from:<\/p>\n<pre>Set($CorrespondAddress , 'rt@svr011.example.com');\r\nSet($CommentAddress , 'rt-comment@svr011.example.com');<\/pre>\n<p>to<\/p>\n<pre>Set($CorrespondAddress , 'rt@example.com');\r\nSet($CommentAddress , 'rt-comment@example.com');<\/pre>\n<p>Also paste the following lines to the end of the file, then save and exit:<\/p>\n<pre>Set($MaxAttachmentSize , 10000000);\r\nSet($FriendlyFromLineFormat, \"\\\"%s\\\" &lt;%s&gt;\");<\/pre>\n<h2>Apache2 Configuration<\/h2>\n<p>Edit the apache2 default available sites:<\/p>\n<pre>sudo nano \/etc\/apache2\/sites-available\/default<\/pre>\n<p>Find the end of the file &#8220;&lt;\/VirtualHost&gt;&#8221; and add the following line just above it:<\/p>\n<pre>Include \/etc\/request-tracker4\/apache2-modperl2.conf\r\nRedirectMatch ^\/$ \/rt<\/pre>\n<p>Save the file and exit.<\/p>\n<p>To enable mod_rewrite run the command:<\/p>\n<pre>sudo a2enmod rewrite<\/pre>\n<p>And then restart apache2:<\/p>\n<pre>sudo service apache2 restart<\/pre>\n<h2>RT Web Configuration<\/h2>\n<p>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 &#8220;root&#8221; and the password configured during installation (note. this is the root user for RT not your system).<a href=\"http:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image1-Login.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"145\" data-permalink=\"https:\/\/burn.co.nz\/blog\/?attachment_id=145\" data-orig-file=\"https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image1-Login.png\" data-orig-size=\"966,507\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"RT4 Login Screen\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image1-Login.png\" class=\"alignnone size-full wp-image-145\" title=\"RT4 Login Screen\" alt=\"RT4 Login Screen\" src=\"http:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image1-Login.png\" width=\"966\" height=\"507\" srcset=\"https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image1-Login.png 966w, https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image1-Login-300x157.png 300w\" sizes=\"auto, (max-width: 966px) 100vw, 966px\" \/><\/a><\/p>\n<p>From the home screen browse to <strong>Tools -&gt; Configuration -&gt; Queues -&gt; Select<\/strong>. <a href=\"http:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image2-Queues.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-146\" title=\"RT4 Queues\" alt=\"RT4 Queues\" src=\"http:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image2-Queues.png\" width=\"575\" height=\"400\" \/><\/a><\/p>\n<p>Under name click on the <strong>General<\/strong> queue as shown below.<a href=\"http:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image3-Edit-Queues.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-147\" title=\"RT4 List Queues\" alt=\"RT4 List Queues\" src=\"http:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image3-Edit-Queues.png\" width=\"552\" height=\"345\" \/><\/a><\/p>\n<p>You can now edit the configuration for the queue. Change the <strong>Description<\/strong> as this will appear as the senders name in emails from the queue.<\/p>\n<p><strong>Important:<\/strong> If you change the <strong>Queue Name<\/strong>, you need to modify the fetchmailrc (see below).<strong><br \/>\n<\/strong><a href=\"http:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image4-Config-Queues.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"148\" data-permalink=\"https:\/\/burn.co.nz\/blog\/?attachment_id=148\" data-orig-file=\"https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image4-Config-Queues.png\" data-orig-size=\"966,631\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"RT4 Configure Queues\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image4-Config-Queues.png\" class=\"alignnone size-full wp-image-148\" title=\"RT4 Configure Queues\" alt=\"RT4 Configure Queues\" src=\"http:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image4-Config-Queues.png\" width=\"966\" height=\"631\" srcset=\"https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image4-Config-Queues.png 966w, https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/03\/RT4-image4-Config-Queues-300x195.png 300w\" sizes=\"auto, (max-width: 966px) 100vw, 966px\" \/><\/a><\/p>\n<p>When you are happy with the queue settings click on <strong>Group Rights<\/strong> (top right-hand corner):<\/p>\n<p><a href=\"http:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/02\/RT4-image5-Group-Rights.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"149\" data-permalink=\"https:\/\/burn.co.nz\/blog\/?attachment_id=149\" data-orig-file=\"https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/02\/RT4-image5-Group-Rights.png\" data-orig-size=\"359,143\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"RT4 Group Rights\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/02\/RT4-image5-Group-Rights.png\" class=\"alignnone size-full wp-image-149\" title=\"RT4 Group Rights\" alt=\"RT4 Group Rights\" src=\"http:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/02\/RT4-image5-Group-Rights.png\" width=\"359\" height=\"143\" srcset=\"https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/02\/RT4-image5-Group-Rights.png 359w, https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/02\/RT4-image5-Group-Rights-300x119.png 300w\" sizes=\"auto, (max-width: 359px) 100vw, 359px\" \/><\/a><\/p>\n<p>As below make sure <strong>Everyone<\/strong> is selected before ticking the boxes next to:<\/p>\n<ul>\n<li>Comment on tickets<\/li>\n<li>Create tickets<\/li>\n<li>Reply to tickets<\/li>\n<\/ul>\n<p>and then click <strong>Save Changes<\/strong>.<\/p>\n<p><a href=\"http:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/02\/RT4-image6-Modify-Group-Rights.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"151\" data-permalink=\"https:\/\/burn.co.nz\/blog\/?attachment_id=151\" data-orig-file=\"https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/02\/RT4-image6-Modify-Group-Rights.png\" data-orig-size=\"965,471\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"RT4 Modify Group Rights\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/02\/RT4-image6-Modify-Group-Rights.png\" class=\"alignnone size-full wp-image-151\" title=\"RT4 Modify Group Rights\" alt=\"RT4 Modify Group Rights\" src=\"http:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/02\/RT4-image6-Modify-Group-Rights.png\" width=\"965\" height=\"471\" srcset=\"https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/02\/RT4-image6-Modify-Group-Rights.png 965w, https:\/\/burn.co.nz\/blog\/wp-content\/uploads\/2012\/02\/RT4-image6-Modify-Group-Rights-300x146.png 300w\" sizes=\"auto, (max-width: 965px) 100vw, 965px\" \/><\/a><\/p>\n<h2>fetchmail Configuration<\/h2>\n<p>Enable the fetchmail daemon to start:<\/p>\n<pre>sudo nano \/etc\/default\/fetchmail<\/pre>\n<p>Modify the last line and save:<\/p>\n<pre>START_DAEMON=yes<\/pre>\n<p>Create a new fetchmailrc config file and edit it:<\/p>\n<pre>sudo nano \/etc\/fetchmailrc<\/pre>\n<p>Paste the following lines into fetchmailrc and edit to suit:<\/p>\n<pre>set daemon 60\r\nset invisible\r\nset no bouncemail\r\nset syslog\r\n\r\npoll pop3.example.com protocol pop3 \r\n username \"rt@example.com\" password \"password\"\r\n mda \"\/usr\/bin\/rt-mailgate --queue general --action correspond --url http:\/\/localhost\/rt\/\"\r\n no keep\r\n;\r\n\r\npoll pop3.example.com protocol pop3\r\n username \"rt-comment@example.com\" password \"password\"\r\n\u00a0mda \"\/usr\/bin\/rt-mailgate --queue general --action comment --url http:\/\/localhost\/rt\/\"\r\n\u00a0no keep\r\n;<\/pre>\n<p><strong>Important:<\/strong> If you changed the <strong>Queue Name<\/strong> during <strong>RT Web Configuration<\/strong>, you need to modify the queue name in fetchmailrc\u00a0 or incoming email will not work.<strong> <\/strong><\/p>\n<p>Restart the RT host and while you are waiting send an email to RT (eg\u00a0 rt@example.com) from your email account.<\/p>\n<p>Once the server is back fetchmail should retrieve the email within 60 seconds &amp; forward it to RT. You will then get an email reply and the newly created ticket should appear in the web interface.<\/p>\n<h2>crontab Configuration<\/h2>\n<p>There are a few jobs which you will want to run regularly. The easiest way is to add these to cron:<\/p>\n<pre>sudo crontab -e<\/pre>\n<p>Add the following lines then save and exit:<\/p>\n<pre>0 0 * * * \/usr\/sbin\/rt-email-digest -m daily\r\n0 0 * * 0 \/usr\/sbin\/rt-email-digest -m weekly\r\n0 * * * * \/usr\/sbin\/rt-email-dashboards<\/pre>\n<h2>What Now?<\/h2>\n<p>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.<\/p>\n<p>Over the next few months I will try to add more RT howto&#8217;s including adding queues,\u00a0 integrating with an AD domain, and enabling fast full-text searching.<\/p>\n<h2>Request Tracker Links<\/h2>\n<p><a href=\"http:\/\/bestpractical.com\/rt\/\">http:\/\/bestpractical.com\/rt\/<\/a><br \/>\n<a href=\"http:\/\/requesttracker.wikia.com\/wiki\/HomePage\">http:\/\/requesttracker.wikia.com\/wiki\/HomePage<\/a><br \/>\n<a href=\"http:\/\/blog.bestpractical.com\/\">http:\/\/blog.bestpractical.com\/<\/a><br \/>\n<a href=\"http:\/\/bestpractical.com\/rt\/lists.html\">http:\/\/bestpractical.com\/rt\/lists.html<\/a><br \/>\n<a href=\"http:\/\/www.bestpractical.com\/rt\/docs\/4.0\/backups.html\">http:\/\/www.bestpractical.com\/rt\/docs\/4.0\/backups.html<\/a><\/p>\n<h2>Additional links<\/h2>\n<p><a href=\"http:\/\/requesttracker.wikia.com\/wiki\/WithEmailFacility\">http:\/\/requesttracker.wikia.com\/wiki\/WithEmailFacility<\/a><br \/>\n<a href=\"http:\/\/www.hollenback.net\/index.php\/RequestTrackerOnCentos5\">http:\/\/www.hollenback.net\/index.php\/RequestTrackerOnCentos5<\/a><br \/>\n<a href=\"http:\/\/wiki.debian.org\/Manual-Howto\">http:\/\/wiki.debian.org\/Manual-Howto<\/a><br \/>\n<a href=\"http:\/\/pkg-exim4.alioth.debian.org\/README\/README.Debian.html\">http:\/\/pkg-exim4.alioth.debian.org\/README\/README.Debian.html<\/a><br \/>\n<a href=\"http:\/\/wiki.debian.org\/GmailAndExim4\">http:\/\/wiki.debian.org\/GmailAndExim4<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Continued from Part 1\/2 Previously we covered installing Debian and configuring some basics. This time we dig into installing Request Tracker 4 and making it work. Install Required Packages Edit your APT sources file:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,5],"tags":[10,25,24,7,9,12],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-howto","category-linux","tag-debian","tag-howto","tag-linux","tag-request-tracker","tag-rt","tag-sysadmin"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2duNU-S","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/burn.co.nz\/blog\/index.php?rest_route=\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/burn.co.nz\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/burn.co.nz\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/burn.co.nz\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/burn.co.nz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=54"}],"version-history":[{"count":55,"href":"https:\/\/burn.co.nz\/blog\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions"}],"predecessor-version":[{"id":333,"href":"https:\/\/burn.co.nz\/blog\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions\/333"}],"wp:attachment":[{"href":"https:\/\/burn.co.nz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/burn.co.nz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/burn.co.nz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}