Changes RSS

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

guides:rt3.8 [2009/03/04 22:20]
fishy
guides:rt3.8 [2009/03/16 16:02] (current)
fishy
Line 1: Line 1:
-http://wiki.bestpractical.com/view/DebianLennyInstallGuide+====== How I installed Request Tracker 3.8.2 on Debian Lenny ====== 
 + 
 +My first hints and pointers were from the poorly formatted guide at: 
 + 
 +  * http://wiki.bestpractical.com/view/DebianLennyInstallGuide 
 + 
 +===== Basic prerequisites ===== 
 + 
 +Install "providing" software. By this, I mean software that is needed to compile software, serve data to the web, test the data served, and communicate with the world.  
 + 
 +<code> 
 +apt-get install build-essential bzip2 \ 
 +                gcc libncurses5 libncurses5-dev bin86 gawk \ 
 +                ncurses-dev initramfs-tools \ 
 +                zlib1g zlib1g-dev binutils 
 + 
 +sudo apt-get install openssl apache2  mysql-server-5.0 \ 
 +                libapache2-mod-perl2 curl lftp lynx \ 
 +                mlocate makepatch wget gpgv libgpgme11 \ 
 +                libgpgme11-dev libgpg-error0 libgpg-error-dev \ 
 +                libapache2-mod-fcgid libcgi-fast-perl libfcgi-perl libfcgi-dev 
 + 
 + 
 +sudo apt-get install fetchmail 
 + 
 +</code> 
 + 
 +Install and configure an MTA. I prefer to use postfix, and in my setup, the postfix installation is configured to use a smarthost to send mail out to the world. 
 + 
 +<code> 
 +sudo apt-get install postfix 
 +</code> 
 + 
 + 
 +===== Perl prerequisites... ===== 
 + 
 +Next up is a shockingly long list of development- and perl-dependencies. The commands below are split into chunks that the BASH shell will accept, but the order, and eventual dependency satification is not taken into consideration. I.e. the list is for completeness. 
 + 
 +Your mileage may vary on what you actually need to install. 
 + 
 +==== OS packaged perl-dependencies ==== 
 <code> <code>
-sudo apt-get install openssl apache2  mysql-server-5.0 libc6-dev libc-dev +sudo apt-get install  libc6-dev libc-dev gcc-4.1-base libmudflap0 libmudflap0-dev
-                gcc-4.1-base libmudflap0 libmudflap0-dev libapache2-mod-perl2 \+
                 libxml-dom-perl libxml-encoding-perl libxml-parser-perl \                 libxml-dom-perl libxml-encoding-perl libxml-parser-perl \
-                libxml-perl libxml-regexp-perl libxml-um-perl curl lftp lynx +                libxml-perl libxml-regexp-perl libxml-um-perl \ 
-                libxml-handler-composer-perl libxml-generator-perl mlocate makepatch+                libxml-handler-composer-perl libxml-generator-perl
  
 sudo apt-get install libapache-dbi-perl libapache-session-perl \ sudo apt-get install libapache-dbi-perl libapache-session-perl \
Line 13: Line 53:
                 libdatetime-timezone-perl libdbd-sqlite3-perl \                 libdatetime-timezone-perl libdbd-sqlite3-perl \
                 libdbix-searchbuilder-perl liberror-perl libexception-class-perl \                 libdbix-searchbuilder-perl liberror-perl libexception-class-perl \
-                libgd-gd2-noxpm-perl libgd-graph-perl libgd-text-perl \ +                libgd-gd2-noxpm-perl libgd-graph-perl libgd-text-perl  
-                libhtml-mason-perl libhtml-scrubber-perl libio-socket-ssl-perl \+ 
 +sudo apt-get install libhtml-mason-perl libhtml-scrubber-perl libio-socket-ssl-perl \
                 libmime-tools-perl libmodule-versions-report-perl libnet-libidn-perl \                 libmime-tools-perl libmodule-versions-report-perl libnet-libidn-perl \
                 libnet-ssleay-perl libparams-validate-perl libregexp-common-perl \                 libnet-ssleay-perl libparams-validate-perl libregexp-common-perl \
                 libcache-cache-perl libcache-simple-timedexpiry-perl \                 libcache-cache-perl libcache-simple-timedexpiry-perl \
                 libclass-accessor-perl libclass-container-perl \                 libclass-accessor-perl libclass-container-perl \
-                libclass-data-inheritable-perl libclass-returnvalue-perl \ +                libclass-data-inheritable-perl libclass-returnvalue-perl 
-                libclass-singleton-perl libclone-perl libdbix-dbschema-perl \+ 
 +sudo apt-get install libclass-singleton-perl libclone-perl libdbix-dbschema-perl \
                 libdevel-stacktrace-perl libfreezethaw-perl libipc-sharelite-perl \                 libdevel-stacktrace-perl libfreezethaw-perl libipc-sharelite-perl \
-                libwant-perl+                libwant-perl libterm-readline-perl-perl libtext-autoformat-perl \ 
 +                libtext-quoted-perl libtext-reform-perl libtext-template-perl
  
-sudo apt-get install libterm-readline-perl-perl libtext-autoformat-perl \ +sudo apt-get install libtext-wikiformat-perl libtext-wrapper-perl libtime-modules-perl \
-                libtext-quoted-perl libtext-reform-perl libtext-template-perl \ +
-                libtext-wikiformat-perl libtext-wrapper-perl libtime-modules-perl \+
                 libtree-simple-perl libxml-parser-perl libxml-rss-perl \                 libtree-simple-perl libxml-parser-perl libxml-rss-perl \
                 libxml-sax-expat-perl libxml-sax-perl libxml-simple-perl \                 libxml-sax-expat-perl libxml-sax-perl libxml-simple-perl \
                 libxml-namespacesupport-perl                 libxml-namespacesupport-perl
 +</code>
  
-sudo apt-get install postfix +==== CPAN setup ====
-     Set up as  ... Internet site with smarthost....+
  
-sudo apt-get install fetchmail+Now, prepare your Perl CPAN setup, as Request Tracker installation __will__ use CPAN to pull in even more dependencies! 
 +Here follows a somewhat complete(ish) summary of my interaction with CPAN: 
 +[[guides:rt3.8:CPAN]]
  
 +===== Download & unpack Request Tracker =====
 +
 +
 +Now, download and unpack Request Tracker, the latest release:
 +
 +<code>
 wget http://download.bestpractical.com/pub/rt/release/ wget http://download.bestpractical.com/pub/rt/release/
 tar zxvf rt.tar.gz tar zxvf rt.tar.gz
 +cd rt-3.*
 +</code>
  
-sudo perl -MCPAN -e shell +===== Setting up the source tree =====
-Would you like me to configure as much as possible automatically? [yes] no +
-CPAN build and cache directory? [/home/username/.cpan] +
-Download target directory? [/home/fishy/.cpan/sources] +
-Directory where the build process takes place? [/home/fishy/.cpan/build] +
-CPAN.pm sessions? [yes] +
-building modules that need some customization? [/home/fishy/.cpan/prefs] +
-Always commit changes to config variables to disk? [no] +
-Cache size for build directory (in MB)? [100] +
-Let the index expire after how many days? [1] +
-Perform cache scanning (atstart or never)? [atstart] +
-Cache metadata (yes/no)? [yes] +
-Use CPAN::SQLite if available? (yes/no)? [no] yes +
-Policy on building prerequisites (follow, ask or ignore)? [ask] follow +
-Policy on installing 'build_requires' modules (yes, no, ask/yes, +
-ask/no)? [ask/yes] yes +
-Always try to check and verify signatures if a SIGNATURE file is in +
-the package and Module::Signature is installed (yes/no)? [no] +
-Email test reports if CPAN::Reporter is installed (yes/no)? [no] +
-Do you want to enable code deserialisation (yes/no)? [no] yes +
-Where is your bzip2 program? [/bin/bzip2] +
-Where is your gzip program? [/bin/gzip] +
-Where is your tar program? [/bin/tar] +
-Where is your unzip program? [/usr/bin/unzip] +
-Where is your make program? [/usr/bin/make] +
-Where is your curl program? [/usr/bin/curl]  +
-Where is your lynx program? [/usr/bin/lynx]  +
-Where is your ncftpget program? [] +
-Where is your ncftp program? [] +
-Where is your ftp program? [/usr/bin/ftp] +
-Where is your gpg program? [/usr/bin/gpg] +
-Where is your patch program? [/usr/bin/patch] +
-Where is your applypatch program? [/usr/bin/applypatch]  +
-What is your favorite pager program? [/usr/bin/less] +
-What is your favorite shell? [/bin/bash] +
-Tar command verbosity level (none or v or vv)? [v] +
-Verbosity level for loading modules (none or v)? [v] +
-Do you want to turn this message off? [no] +
-In case you can choose between running a Makefile.PL or a Build.PL, +
-which installer would you prefer (EUMM or MB or RAND)? [MB] +
-Parameters for the 'perl Makefile.PL' command? [INSTALLDIRS=site] +
-Parameters for the 'make' command? Typical frequently used setting:+
  
-    -j3              # dual processor system (on GNU make)+The following code sets up my RT install to dump the instance files into the dir /opt/rt/defcon, and 
 +use MySQL for storage
  
- <make_arg+<code
-Your choice: []+./configure \ 
 +  --prefix=/opt/rt/defcon \ 
 +  --enable-gd \ 
 +  --enable-gpg \ 
 +  --with-db-type=mysql \ 
 +</code>
  
-Do you want to use a different make command for 'make install'? +Test for dependencies. This will fail, even though we have run a fairly thorough pre-install... The output below is an excerpt, showing only the packages that failed on my test-run.
-Cautious people will probably prefer:+
  
-    su root -c make +<code> 
- or +make testdeps  
-    sudo make +        Locale::Maketext::Lexicon >= 0.32...MISSING 
- or +        Text::Template >= 1.45...MISSING 
-    /path1/to/sudo -u admin_account /path2/to/make+                Text::Template version 1.45 required--this is only version 1.44  
 +        File::ShareDir...MISSING 
 +        Locale::Maketext::Fuzzy...MISSING 
 +        Log::Dispatch >= 2.0...MISSING 
 +        UNIVERSAL::require...MISSING 
 +        Email::Address...MISSING 
 +        HTML::RewriteAttributes >= 0.02...MISSING 
 +        CGI >= 3.38...MISSING 
 +                CGI version 3.38 required--this is only version 3.29  
 +        PerlIO::eol...MISSING 
 +        GnuPG::Interface...MISSING 
 +        Data::ICal...MISSING 
 +        Net::Server::PreFork...MISSING 
 +        Net::Server...MISSING 
 +        HTTP::Server::Simple >= 0.34...MISSING 
 +        HTTP::Server::Simple::Mason >= 0.09...MISSING 
 +make: *** [testdeps] Error 1 
 +</code>
  
- <make_install_make_command+Use RT's own helper to satisfy the missing dependencies: 
-or some such. Your choice: [/usr/bin/make] +<code
-^[[5~ +sudo make fixdeps 
-Parameters for the 'make install' command? +</code>
-Typical frequently used setting:+
  
-    UNINST=1         # to always uninstall potentially conflicting files+This uses CPAN to pull in the missing or out-dated Perl modules. After a successful run, rerun make testdeps, and you shuld get: 
 +<code> 
 +All dependencies have been found. 
 +</code>
  
- <make_install_arg> +===== Installation =====
-Your choice: [] UNINST=1+
  
-A Build.PL is run by perl in a separate process. Likewise we run +Time to do the actual installation: 
-'./Build' and './Build install' in separate processes. If you have any +<code> 
-parameters you want to pass to the calls, please specify them here.+sudo make install
  
-Typical frequently used settings:+... 
 +</code>
  
-    --install_base /home/xxx             # different installation directory+===== Configuration of RT =====
  
- <mbuildpl_arg> +You must now configure RT by editing /opt/rt/defcon/etc/RT_SiteConfig.pm
-Parameters for the 'perl Build.PL' command? []+
  
-Parameters for the './Build' command? Setting might be:+WARNING: Never, EVER, change RT_Config.pm. All your changes need to be put in 
 +RT_SiteConfig.pm.
  
-    --extra_linker_flags -L/usr/foo/lib  # non-standard library location+(You will definitely need to set RT's database password in  
 +/opt/rt/defcon/etc/RT_SiteConfig.pm before continuing. Not doing so could be  
 +very dangerous.  Note that you do not have to manually add a  
 +database user or set up a database for RT.  These actions will be  
 +taken care of in the next step.)
  
- <mbuild_arg> +So, the natural next step is to open $PREFIX/etc/RT_SiteConfig.pm in your favourite text-editor, and decide on the basic setting of this instance...
-Your choice: []+
  
-Do you want to use a different command for './Build install'? Sudo +<code>
-users will probably prefer:+
  
-    su root -c ./Build +# What RT instance? 
- or +Set($rtname, 'Ticket'); 
-    sudo ./Build +Set($Organization , "defcon.no");
- or +
-    /path1/to/sudo -u admin_account ./Build+
  
- <mbuild_install_build_command>+# Default email adresses 
-or some suchYour choice: [./Build]+Set($CorrespondAddress , 'rt@defcon.no')
 +Set($CommentAddress , 'rt-comment@defcon.no');
  
-Parameters for the './Build installcommand? Typical frequently used +# How to handle time (timezone setting) 
-setting:+Set($Timezone , 'CET');
  
-    --uninst 1                           uninstall conflicting files+Database setup 
 +#Set($DatabaseHost   , 'localhost'); 
 +#Set($DatabaseRTHost , 'localhost'); 
 +#Set($DatabasePort , ''); 
 +Set($DatabaseType, 'mysql'); 
 +Set($DatabaseUser , 'rt_user'); 
 +Set($DatabasePassword , 'password'); 
 +Set($DatabaseName , 'rt_database');
  
- <mbuild_install_arg>+# Who is owner/admin of this instance? 
-Your choice: [] --uninst 1+Set($OwnerEmail , 'rtowner@defcon.no')
 +Set($LoopsToRTOwner , 1);
  
-Timeout for inactivity during {Makefile,Build}.PL? [0] +# Max allowed attachmentsup from 10MB to 20MB 
-Your ftp_proxy? [] +Set($MaxAttachmentSize , 20000000);
-Your http_proxy? [] +
-Your no_proxy? [] +
-Shall we always set the FTP_PASSIVE environment variable when dealing +
-with ftp download (yes/no)? [yes] +
-Preferred method for determining the current working directory? [cwd] +
-Do you want the command number in the prompt (yes/no)? [yes] +
-Do you want to turn ornaments on? [yes] +
-Do you want to turn on colored output? [no] +
-Your terminal expects ISO-8859-1 (yes/no)? [yes] +
-File to save your history? [/home/fishy/.cpan/histfile] +
-Number of lines to save? [100] +
-Always try to show upload date with 'd' and 'm' command (yes/no)? [no] +
-Show all individual modules that have no $VERSION? [no] +
-Show all individual modules that have a $VERSION of zero? [no] +
-Is it OK to try to connect to the Internet? [yes] +
-Select your continent (or several nearby continents[] 4 +
-Select your country (or several nearby countries) [] 19 +
- e.g. '1 4 5' or '7 1-4 8' [] 2 +
-Enter another URL or RETURN to quit: []+
  
-cpan[2]&gtinstall Bundle::CPAN+# Where do we exist on the web? 
 +Set($WebDomain, 'rt.home.defcon.no'); 
 + 
 +# RT resides on the root of the previous name... 
 +Set($WebPath, &quot;");
  
 </code> </code>
 +
 +===== Initialize the RT database =====
 +
 +<code>
 +sudo make initialize-database
 +</code>
 +
 +===== Configure HTTPd =====
 +
 +I am using Apache2, and running RT through mod_perl. Note the PerlRequire, SetHandler and PerlResponseHandler. Without these, your RT will __not__ work.
 +
 +<code>
 +# /etc/apache2/sites-available/rt.home.defcon.no
 +<VirtualHost *:80>
 +
 +ServerName rt.home.defcon.no
 +
 +DocumentRoot /opt/rt/defcon/share/html
 +PerlRequire "/opt/rt/defcon/bin/webmux.pl"
 +
 +<Location />
 +    AddDefaultCharset UTF-8
 +    SetHandler perl-script
 +    PerlResponseHandler RT::Mason
 +</Location>
 +
 +</VirtualHost> 
 +
 +</code>
 +
 +As this is a Debian Lenny system, I used the Debian helper tools to enable all needed apache2 related configurations:
 +
 +<code>
 +sudo /usr/sbin/a2enmod perl
 +sudo /usr/sbin/a2enmod rewrite
 +sudo /usr/sbin/a2ensite rt.home.defcon.no
 +sudo /etc/init.d/apache2 reload
 +</code>
 +
 +===== First look at the installed RT =====
 +
 +Go to the address you have configured in Apache, DNS and RT_SiteConfig.pm, and you should be greeted with the login-box of RT3.8!
 +
 +Log in as "root" with password "password". Now SET A NEW PASSWORD ! (!)
 +  * Preferences
 +    * About me
 +    * Password
 +      * New passord
 +      * Retype passord
 +
 +===== Post install setup =====
 +
 +That's not all, but it is all for now...
 +
 +==== Overriding the footer ====
 +
 +<code>
 +web:/opt/rt/defcon# mkdir local/html/Elements
 +web:/opt/rt/defcon# cp share/html/Elements/Footer local/html/Elements/
 +web:/opt/rt/defcon# vim local/html/Elements/Footer 
 +</code>
 +
 +==== Setting up default permissions ====
 +
 +==== Adding a few queues ====
 +
 +