How to install RT3 ------------------- By Stuart Winter Reference URLs: http://perl.apache.org/docs/1.0/guide/install.html http://www.macdevcenter.com/lpt/a/2884 Notes: We use a separate version of Apache for rt. We do not run RT from our existing web server. Why? Because it has rubbish compiled into it that's required for RT3. We also only use Apache 1.3 for rt3 because it works. [1] Pre-requisites -------------- Ensure UKShells' cpan_modules package is installed. If not, cd /tmp lftp ftp://ftp.uksolutions.net/uks/slackwarepackages/packages_9.1/ get cpan_modu*tgz installpkg cpan*tgz However, if you don't want to install than then you need to just read the rt3 instructions and install the correct modules. [2] Add user and group for rt ------------------------- groupadd rt useradd -s /bin/false -d /opt/rt3 -p '*' -g rt rt rm -rf /opt/rt3 # * BE CAREFUL! * mkdir -p /opt/rt3 chown -R rt.rt /opt/rt3 [3] Setup build area in /usr/src ---------------------------- cd /usr/src rm -rf rt3 mkdir -pm700 rt3 mkdir -p rt3/source cd rt3/source [4] Download source --------------- wget http://download.bestpractical.com/pub/rt/release/rt-3-0-9.tar.gz wget http://perl.apache.org/dist/mod_perl-1.0-current.tar.gz wget ftp://ftp.flirble.org/pub/web/apache/dist/httpd/apache_1.3.29.tar.gz wget http://www.modssl.org/source/mod_ssl-2.8.16-1.3.29.tar.gz wget http://www.fsck.com/pub/rt/devel/rt2-to-rt3-v1.20.tar.gz [5] Extract source -------------- cd .. tar zxf source/apache_1.3*tar.gz tar zxf source/mod_perl-1*.tar.gz tar zxf source/rt-3*.tar.gz tar zxf source/mod_ssl*gz mv mod*ssl* modssl mv mod*perl* modperl mv apache* apache mv rt* rt3 # Conversion scripts: rt2 -> rt3 ( mkdir rt2_to_rt3 cd rt2_to_rt3 tar zxf ../source/rt2-to-rt3-*gz ) chown -R root.root . chmod -R og-w . [6] Build mod_ssl ------------- ( cd modssl CFLAGS="-O2 -march=i686" \ ./configure --with-apache=$( /bin/ls -d ../apache ) ) [7] Build mod_perl -------------- cd modperl perl Makefile.PL EVERYTHING=1 DO_HTTPD=1 USE_APACI=1 \ APACI_ARGS='--prefix=/opt/rt-httpd \ --enable-module=rewrite \ --enable-module=expires \ --enable-module=speling \ --enable-shared=status \ --enable-shared=max \ --enable-suexec \ --suexec-userdir=www \ --suexec-caller=nobody \ --enable-module=so \ --activate-module=src/modules/ssl/libssl.a \ --activate-module=src/modules/perl/libperl.a' # ** If you find that Apache won't load, it's probably because # it has 'ClearModuleList' in either conf/httpd.conf or # conf/modules.conf. You can remove this line and also # comment out the add_module lines ** # Compile and install mod_perl into our rt-Apache's source tree make && make install # Build & install the rt-only version of httpd cd ../apache make && make install # Delete some of the default Apache cruft ( cd /opt/rt-httpd/conf rm -rf *default ssl.* ) [8] Build and install rt3 --------------------- unset HISTFILE export RTDBPASS=ddsdmfpass export RTDBHOST=localhost export RTDBLHOST=localhost cd ../rt3 ./configure \ --prefix=/opt/rt3 \ --with-rt-group=rt \ --with-bin-owner=rt \ --with-db-type=mysql \ --with-db-host=${RTDBHOST} \ --with-db-rt-host=${RTDBLHOST} \ --with-db-port=3306 \ --with-db-dba=root \ --with-db-database=rt3 \ --with-db-rt-user=rt \ --with-db-rt-pass=${RTDBPASS} \ --with-web-user=nobody \ --with-web-group=nobody # Some CPAN modules will be reported as missing which isn't true. # Ignore them unless you find rt3 doesn't work when you come to use it. perl sbin/rt-test-dependencies --with-mysql --with-modperl1 --install # Check everything # perl sbin/rt-test-dependencies --with-mysql --with-modperl1 make install # We need the .qmail-default file to be created: |/opt/rt3/bin/rt-mailgate --queue $DEFAULT --action correspond --url "http://rt.domain.com/ #Make that the /opt/rt3/.qmail-default # Initialise the database. DO NOT DO THIS IF YOU ARE ONLY UPGRADING. make initialize-database # You now need to configure the /opt/rt3/RT_Config.pm # Do a diff -u /opt/rt3/RT_Config.pm RT_Config.pm # (the second file being that which resides within HOWTO directory) # and modify the new file accordingly. # Enter root password for database server # ** You need to configure rt3 to re-open stalled tickets otherwise # you won't see the replies ** [9] Add config to rt-httpd's httpd.conf ----------------------------------- cat << EOF >> /opt/rt-httpd/conf/httpd.conf ServerName rt.domain.com DocumentRoot /opt/rt3/share/html AddDefaultCharset UTF-8 # these four lines apply to Apache2+mod_perl2 only: {{{ # PerlSetVar MasonArgsMethod CGI # PerlModule Apache2 Apache::compat # RewriteEngine On # RewriteRule ^(.*)/$ $1/index.html # }}} PerlModule Apache::DBI PerlRequire /opt/rt3/bin/webmux.pl SetHandler perl-script PerlHandler RT::Mason EOF # In the AddModules section, add in # AddModule mod_perl.c [10] Test new rt system ------------------- # The default user name is 'root' and password 'password' #EOF