Skip to content

Instantly share code, notes, and snippets.

@alokjani
Last active November 1, 2019 08:15
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save alokjani/d9eda34a1b5ab70a50e8 to your computer and use it in GitHub Desktop.
Save alokjani/d9eda34a1b5ab70a50e8 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-4.0.22.tar.gz ; 
wget https://download.bestpractical.com/pub//rt/release/RT-IR-3.0.4.tar.gz ;
adduser --system --group rt;
usermod -aG rt www-data;
tar xzvf rt-4.0*.tar.gz;
cd /usr/src/rt-4.0.22
./configure --with-web-user=www-data --with-web-group=www-data --enable-graphviz --enable-gd
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
Copy link

ghost commented May 11, 2015

These instructions are very concise, easy to follow but I'm having trouble.

Everything seems to work well. Test under "to test the installation" works like a charm, even after adding the IM components. However, nothing loads unless I've manually run rt-server. Am I missing something here? An init script?

@m4xpwr
Copy link

m4xpwr commented Oct 2, 2015

Add the following line to /etc/apache2/ports.conf
...
Listen 8081
...
Then restart apache2 service

@faridvgs
Copy link

faridvgs commented Nov 11, 2016

Hello,
I am currently installing rt-4.4.1 and RT-IR-4.0.0 under this manual, but I have several errors when I run the make testdeps command

My operating system is ubuntu 16.04

root@tracking:/usr/src/rt-4.4.1# make testdeps
/usr/bin/perl ./sbin/rt-test-dependencies --with-mysql --with-fastcgi
perl:
>=5.10.1(5.22.1) ...found
users:
rt group (rt) ...found
bin owner (root) ...found
libs owner (root) ...found
libs group (bin) ...found
web owner (www-data) ...found
web group (www-data) ...found
CLI dependencies:
HTTP::Request::Common ...found
Term::ReadLine ...found
Term::ReadKey ...MISSING
Getopt::Long >= 2.24 ...found
Text::ParseWords ...found
LWP ...found
CORE dependencies:
Digest::base ...found
Plack >= 1.0002 ...found
Plack::Handler::Starlet ...found
Locale::Maketext::Fuzzy >= 0.11 ...found
IPC::Run3 ...found
HTML::Scrubber >= 0.08 ...found
Module::Refresh >= 0.03 ...found
Date::Extract >= 0.02 ...MISSING
Convert::Color ...found
JSON ...found
Text::Template >= 1.44 ...found
DBIx::SearchBuilder >= 1.65 ...found
Module::Versions::Report >= 1.05 ...found
Data::Page::Pageset ...MISSING
Digest::MD5 >= 2.27 ...found
List::MoreUtils ...found
File::Temp >= 0.19 ...found
HTML::RewriteAttributes >= 0.05 ...found
Errno ...found
CGI::Cookie >= 1.20 ...found
Email::Address >= 1.897 ...found
CGI::PSGI >= 0.12 ...found
Crypt::Eksblowfish ...MISSING
Scalar::Util ...found
Text::Wrapper ...found
Net::CIDR ...found
HTML::Mason::PSGIHandler >= 0.52 ...found
File::Glob ...found
Symbol::Global::Name >= 0.05 ...MISSING
MIME::Entity >= 5.504 ...found
CGI >= 4 ...found
DateTime >= 0.44 ...found
Encode >= 2.64 ...found
Storable >= 2.08 ...found
Scope::Upper ...found
URI >= 1.59 ...found
DateTime::Format::Natural >= 0.67 ...MISSING
Log::Dispatch >= 2.30 ...found
Regexp::Common ...found
Digest::SHA ...found
Text::Password::Pronounceable ...found
XML::RSS >= 1.05 ...found
HTML::FormatText::WithLinks::AndTables >= 0.06 ...MISSING
Sys::Syslog >= 0.16 ...found
Tree::Simple >= 1.04 ...found
Pod::Select ...found
LWP::Simple ...found
Net::IP ...MISSING
File::Spec >= 0.8 ...found
UNIVERSAL::require ...found
Data::GUID ...MISSING
Data::ICal ...found
JavaScript::Minifier::XS ...MISSING
HTTP::Message >= 6.0 ...found
File::ShareDir ...found
URI::QueryParam ...found
HTML::Mason >= 1.43 ...found
Business::Hours ...MISSING
Text::Quoted >= 2.07 ...found
DateTime::Locale >= 0.40 ...found
HTML::FormatText::WithLinks >= 0.14 ...MISSING
Regexp::Common::net::CIDR ...found
Regexp::IPv6 ...found
Date::Manip ...MISSING
Mail::Header >= 2.12 ...found
CSS::Minifier::XS ...MISSING
HTML::Quoted ...found
Text::WikiFormat >= 0.76 ...found
Mail::Mailer >= 1.57 ...found
CGI::Emulate::PSGI ...found
Time::HiRes ...found
Devel::StackTrace >= 1.19 ...found
Locale::Maketext::Lexicon >= 0.32 ...found
Locale::Maketext >= 1.06 ...found
CSS::Squish >= 0.06 ...found
HTML::Entities ...found
Devel::GlobalDestruction ...found
Role::Basic >= 0.12 ...MISSING
Time::ParseDate ...found
Apache::Session >= 1.53 ...found
DBI >= 1.37 ...found
Class::Accessor::Fast ...found
MIME::Types ...found
Email::Address::List >= 0.02 ...MISSING
FASTCGI dependencies:
FCGI >= 0.74 ...found
GD dependencies:
GD::Text ...found
GD ...found
GD::Graph >= 1.47 ...found
GPG dependencies:
PerlIO::eol ...found
File::Which ...MISSING
GnuPG::Interface ...found
GRAPHVIZ dependencies:
GraphViz ...found
IPC::Run >= 0.90 ...found
MAILGATE dependencies:
Getopt::Long ...found
Mozilla::CA ...MISSING
LWP::Protocol::https ...found
Crypt::SSLeay ...MISSING
Pod::Usage ...found
LWP::UserAgent >= 6.0 ...found
Net::SSL ...MISSING
MYSQL dependencies:
DBD::mysql >= 2.1018 ...MISSING
SMIME dependencies:
Crypt::X509 ...MISSING
File::Which ...MISSING
String::ShellQuote ...MISSING

SOME DEPENDENCIES WERE MISSING.
SMIME missing dependencies:
String::ShellQuote ...MISSING
Crypt::X509 ...MISSING
File::Which ...MISSING
MAILGATE missing dependencies:
Net::SSL ...MISSING
Mozilla::CA ...MISSING
Crypt::SSLeay ...MISSING
CLI missing dependencies:
Term::ReadKey ...MISSING
GPG missing dependencies:
File::Which ...MISSING
MYSQL missing dependencies:
DBD::mysql >= 2.1018 ...MISSING
CORE missing dependencies:
Data::Page::Pageset ...MISSING
Business::Hours ...MISSING
Email::Address::List >= 0.02 ...MISSING
Date::Extract >= 0.02 ...MISSING
Net::IP ...MISSING
Role::Basic >= 0.12 ...MISSING
Crypt::Eksblowfish ...MISSING
CSS::Minifier::XS ...MISSING
JavaScript::Minifier::XS ...MISSING
HTML::FormatText::WithLinks::AndTables >= 0.06 ...MISSING
Date::Manip ...MISSING
Symbol::Global::Name >= 0.05 ...MISSING
Data::GUID ...MISSING
HTML::FormatText::WithLinks >= 0.14 ...MISSING
DateTime::Format::Natural >= 0.67 ...MISSING

Perl library path for /usr/bin/perl:
/etc/perl
/usr/local/lib/x86_64-linux-gnu/perl/5.22.1
/usr/local/share/perl/5.22.1
/usr/lib/x86_64-linux-gnu/perl5/5.22
/usr/share/perl5
/usr/lib/x86_64-linux-gnu/perl/5.22
/usr/share/perl/5.22
/usr/local/lib/site_perl
/usr/lib/x86_64-linux-gnu/perl-base
.
Makefile:269: recipe for target 'testdeps' failed
make: *** [testdeps] Error 1
root@tracking:/usr/src/rt-4.4.1#

I have not succeeded in installing dependencies that are not found.

Your help please.

@Turecky
Copy link

Turecky commented Jan 4, 2017

Do you run
make fixdeps

@fadoski
Copy link

fadoski commented Jan 16, 2017

Hi @faridvgs

Got mine to work... Ubuntu 16.04 RT 4.4.1...

At the point when fixdeps fails, run '/usr/bin/perl -MCPAN -e shell' and do an auto config. Once it's done, do 'make fixdeps' again. That should sort you out.

@1syntra1
Copy link

1syntra1 commented May 24, 2017

Hi guys,
i am getting this error ?

helpdesk@helpdesk:/usr/src/RT-IR-4.0.0$ sudo make install
[sudo] password for helpdesk:
Manifying 25 pod documents
Appending installation info to /opt/rt4/local/man/perllocal.pod
Couldn't load RT config file RT_SiteConfig.pm:

syntax error at /opt/rt4/etc/RT_SiteConfig.pm line 37, near "Set"
Compilation failed in require at /opt/rt4/lib/RT/Config.pm line 1270.
Makefile:1014: recipe for target 'install' failed
make: *** [install] Error 255

Please help

@certa1n
Copy link

certa1n commented May 24, 2017

Ubuntu 16 also need deps
make fixdeps
or
apt-get install libfile-which-perl libcrypt-eksblowfish-perl libdate-extract-perl libjavascript-minifier-xs-perl libdate-manip-perl librole-basic-perl libdatetime-format-natural-perl libdata-guid-perl libcss-minifier-xs-perl libsymbol-global-name-perl libhtml-formattext-withlinks-perl libcrypt-x509-perl libstring-shellquote-perl libnet-https-any-perl libcrypt-ssleay-perl libhtml-formattext-withlinks-andtables-perl

@FernandoQuintero
Copy link

I had the same problem, I resolve it installing the perl modules by hand, but using the cpanm command, not the cpan (default).

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