Skip to content

Instantly share code, notes, and snippets.

@cyhook
Forked from alokjani/gist:d9eda34a1b5ab70a50e8
Last active September 28, 2017 12:31
Show Gist options
  • Save cyhook/f9ed660c7ac50e8e0ca353c6e6cf19b5 to your computer and use it in GitHub Desktop.
Save cyhook/f9ed660c7ac50e8e0ca353c6e6cf19b5 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 rt-4.2.14 RT for Incident Response RTIR 4.0.0

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-4.2.14.tar.gz ; 
wget https://download.bestpractical.com/pub//rt/release/RT-IR-4.0.0.tar.gz ;
wget https://download.bestpractical.com/pub//rt/release/RT-Extension-Assets-1.05.tar.gz ;
adduser --system --group rt;
usermod -aG rt www-data;
tar xzvf rt-4.*.tar.gz;
cd /usr/src/rt-4.2.14
./configure --with-web-user=www-data --with-web-group=www-data --enable-graphviz --enable-gd
cpan Business::Hours Encode@2.64 Crypt::Eksblowfish JavaScript::Minifier::XS Business::Hours Encode@2.64 Crypt::Eksblowfish JavaScript::Minifier::XS CSS::Minifier::XS Email::Address::List@0.02 GD::Graph@1.47 File::Which Crypt::SSLeay Net::SSL Mozilla::CA Crypt::X509 File::Which GD::Graph@1.47 File::Which Crypt::X509 File::Which Data::Page::Pageset JavaScript::Minifier::XS  Crypt::Eksblowfish  Email::Address::List@0.02 Business::Hours CSS::Minifier::XS Encode@2.64 Net::SSL Mozilla::CA Crypt::SSLeay
`````
ADD Missing perl modules in the following list
````````

```bash
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 

```bash
/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
```bash
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>
```

```bash
a2enmod fcgid
a2ensite rt
```

```bash
# 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

```bash
service apache2 restart	# file perms need correcting (bug)
service apache2 reload
```


# RT for Incident Response Module Installation 

### Extract and fix dependencies 
```bash
cd /usr/src
tar xzvf RT-IR-4.0.0.tar.gz
cd /usr/src/RT-IR-4.0.0
```

```bash
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
```bash
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:
```bash
...
Set(@Plugins, 'RT::IR');
...
```

Restart the Perl CGI

```bash
service apache2 restart
```
# RT Extension Assets for Incident Response Module Installation 

### Extract and fix dependencies 
```bash
cd /usr/src
tar xzvf RT-Extension-Assets-1.05.tar.gz
cd /usr/src/RT-Extension-Assets-1.05
```

```bash
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 Extension Assets and update DB schema
```bash
make install		
make initdb
```

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