Skip to content

Instantly share code, notes, and snippets.

@shroukkhan
Forked from alokjani/gist:d9eda34a1b5ab70a50e8
Last active January 23, 2016 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shroukkhan/d4780f0277c807515752 to your computer and use it in GitHub Desktop.
Save shroukkhan/d4780f0277c807515752 to your computer and use it in GitHub Desktop.
Howto - Ubuntu 14.04 with Request Tracker and RT for Incident Response

Ubuntu 14.04 Request Tracker RT 4.0.22 RT for Incident Response RTIR 3.0.4

Request Tracker Installation

export http_proxy="http://10.x.x.x:3128"
export https_proxy="http://10.x.x.x.x:3128"

Setup the database

# apt-get install mysql-server mysql-client libmysqlclient-dev

Setup the CGI Webserver

# apt-get install make apache2 libapache2-mod-fcgid libssl-dev libyaml-perl libgd-dev libgd-gd2-perl libgraphviz-perl

Setup Perl dependencies

# apt-get install libwww-perl libcss-squish-perl libmodule-versions-report-perl libcatalyst-plugin-log-dispatch-perl libregexp-common-perl libuniversal-require-perl libtext-wrapper-perl  libtext-password-pronounceable-perl libtime-modules-perl liblist-moreutils-perl libscalar-util-numeric-perl libdatetime-locale-perl libtext-template-perl libhtml-scrubber-perl libcache-simple-timedexpiry-perl   liblocale-maketext-lexicon-perl libdigest-whirlpool-perl libregexp-common-net-cidr-perl libtext-quoted-perl libmime-tools-perl libdevel-globaldestruction-perl  liblocale-maketext-lexicon-perl libregexp-common-net-cidr-perl libdbix-searchbuilder-perl libdevel-stacktrace-perl libhtml-rewriteattributes-perl libgnupg-interface-perl libperlio-eol-perl libdata-ical-perl libtext-wikiformat-perl libhtml-mason-perl libapache-session-browseable-perl libcgi-psgi-perl libhtml-mason-psgihandler-perl  libcgi-emulate-psgi-perl libconvert-color-perl liblocale-maketext-fuzzy-perl libhtml-quoted-perl libdatetime-perl libnet-cidr-perl libregexp-ipv6-perl libregexp-common-email-address-perl libipc-run3-perl  libxml-rss-perl libconfig-json-perl starlet libgd-text-perl libgd-graph-perl

Download and run the setup

cd /usr/src/;
wget https://download.bestpractical.com/pub/rt/release/rt.tar.gz ; 
wget https://download.bestpractical.com/pub//rt/release/rtir.tar.gz ;
adduser --system --group rt;
usermod -aG rt www-data;
tar xzvf rt.tar.gz;
cd /usr/src/rt-*
./configure --with-web-user=www-data --with-web-group=www-data --enable-graphviz --enable-gd
/usr/bin/perl ./sbin/rt-test-dependencies --verbose --with-mysql --with-fastcgi --install # install required perl modules
make testdeps			# This should show all dependencies as found.
make install			# populates to /opt/rt4/
make initialize-database	# setup DB user and tables

To test the installation

/opt/rt4/sbin/rt-server --port 8080	# Default login for http://10.1.1.155:8080 is root/password

Setup Vhost for running the Perl CGI

cat /etc/apache2/sites-available/rt.conf
<VirtualHost *:8081>
        ServerAdmin webmaster@localhost
        ServerName 10.1.1.155:8081

        AddDefaultCharset UTF-8
        DocumentRoot /opt/rt4/share/html
        Alias /NoAuth/images/ /opt/rt4/share/html/NoAuth/images/
        ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/
        <Location />
                Require all granted
        </Location>

        LogLevel info

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>
a2enmod fcgid
a2ensite rt
# vim /opt/rt4/etc/RT_SiteConfig.pm
...
Set( $rtname, '10.1.1.155');
Set($WebDomain, '10.1.1.155');
Set($WebPort, 8081);
...

Fix perms and restart

chown www-data:www-data -R /opt/rt4/var/mason_data 	# file perms need correcting (bug)
service apache2 reload

RT for Incident Response Module Installation

Extract and fix dependencies

cd /usr/src
tar xzvf RT-IR-3.0.4.tar.gz
cd /usr/src/RT-IR-3.0.4
apt-get install libhook-lexwrap-perl libnet-whois-ripe-perl
perl Makefile.PL	# this will show only - Parse::BooleanLogic ...missing.
make			# connects to CPAN and downloads
perl Makefile.PL	# verify that all deps are found.

Install RTIR and update DB schema

make install		# this populates /opt/rt4/local/plugins/RT-IR/
make initdb

Activate the RTIR extension in the /opt/rt4/etc/RT_SiteConfig.pm file:

...
Set(@Plugins, 'RT::IR');
...

Restart the Perl CGI

service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment