[rt-users] RT on RHEL 4 with FastCGI Install Procedure

William Harrison harrison at itrd.gov
Wed Mar 16 13:15:19 EST 2005


Here's what I've done so far to install RT on RHEL 4 with the included Apache2 package and FastCGI.

I'm still getting errors (Apache will not restart once it has been configured). Any help would be greatly appreciated. INstall procedure and notes below.

[error] Can't load '/usr/lib/perl5/5.8.5/i386-linux-thread-multi/auto/MIME/Base64/Base64.so' for module MIME::Base64: /usr/lib/perl5/5.8.5/i386-linux-thread-multi/auto/MIME/Base64/Base64.so: failed to map segment from shared object: Permission denied at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.\n at /usr/lib/perl5/site_perl/5.8.5/MIME/Words.pm line 85\nCompilation failed in require at /usr/lib/perl5/site_perl/5.8.5/MIME/Words.pm line 85.\nBEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5/MIME/Words.pm line 85.\nCompilation failed in require at /usr/lib/perl5/site_perl/5.8.5/MIME/Head.pm line 123.\nBEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5/MIME/Head.pm line 123.\nCompilation failed in require at /usr/lib/perl5/site_perl/5.8.5/MIME/Entity.pm line 235.\nBEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5/MIME/Entity.pm line 235.\nCompilation failed in require at /opt/rt3/lib/RT/I18N.pm line 66.\nBEGIN failed--compilation aborted at /opt/rt3/lib/RT/I18N.pm line 66.\nCompilation failed in require at /opt/rt3/lib/RT.pm line 48.\nBEGIN failed--compilation aborted at /opt/rt3/lib/RT.pm line 48.\nCompilation failed in require at /opt/rt3/bin/webmux.pl line 64.\nBEGIN failed--compilation aborted at /opt/rt3/bin/webmux.pl line 64.\nCompilation failed in require at (eval 2) line 1.\n
[error] Can't load Perl file: /opt/rt3/bin/webmux.pl for server rt.nitrd.gov:0, exiting...

I believe it is tied to installing Apache::DBI, but it fails each and every time via CPAN... suggestions?



INSTALL PROCEDURE:

Fresh install of RHEL 4, then upgrade / up2date / whatever to get latest versions. For me, that looks like:
  httpd-2.0.52-9
  httpd-devel-2.0.52-9
  mysql-4.1.7-4
  mysqlclient10-3.23.58-4
  mysql-server-4.1.7-4
  mysql-devel-4.1.7-4
  libdbi-dbd-mysql-0.6.5-10


Install FastCGI...
  wget http://www.fastcgi.com/dist/mod_fastcgi-2.4.2.tar.gz
  gunzip mod_fastcgi-2.4.2.tar.gz
  tar -xvf mod_fastcgi-2.4.2.tar
  cd mod_fastcgi-2.4.2
  cp Makefile.AP2 Makefile
  edit Makefile:
    ###Modify for location of apache 2 installation:
    top_dir      = /etc/httpd
  make
  make install
  edit /etc/httpd/conf/httpd.conf
    ###Add line to load FastCGI module:
    LoadModule fastcgi_module modules/mod_fastcgi.so
  ### FastCGI wants to have a place to put its logs, and permission to do so:
    mkdir /etc/httpd/logs/fastcgi
    mkdir /etc/httpd/logs/fastcgi/dynamic
    chown apache:apache /etc/httpd/logs/fastcgi
    chown apache:apache /etc/httpd/logs/fastcgi/dynamic
  service httpd start
  ### Check Apache logs to make sure fastcgi started
    less /var/log/httpd/error_log
    ### Should see no lines with [error] referencing FastCGI
    ### Should see one line indicating a [notice] and the pid of FastCGI
      ### [Mon Mar 14 9:16:57 2005] [notice] FastCGI: process manager initialized (pid 3478)


Turn on MySQL server, Apache server, set MySQL root password...
  chkconfig httpd on
  chkconfig mysqld on
  service mysqld start
  mysqladmin -u root password newpass


Set up CPAN initially...
  perl -MCPAN -e shell


Install RT...
  wget http://download.bestpractical.com/pub/rt/release/rt.tar.gz
  gunzip rt.tar.gz
  tar -xvf rt.tar
  cd rt-3.4.1/
  ### RT requires its own group, so let's add it now lest we forget:
    groupadd rt
  ### Set up the makefile for us with the proper settings:
    ./configure --with-web-user=apache --with-web-group=apache --with-mysql --with-fastcgi
  ### Show us what's missing and what's not:
    perl sbin/rt-test-dependencies --with-mysql --with-fastcgi --verbose
  ### Try to install what's missing for us through CPAN:
    perl sbin/rt-test-dependencies --with-mysql --with-fastcgi --install
  ### Test again and only show us the MISSING items this time:
    perl sbin/rt-test-dependencies --with-mysql --with-fastcgi --verbose | grep MISSING
  ### MIME::Entity won't install without MIME::Base64, so install that first:
    perl -MCPAN -e 'install MIME::Base64'
  ### Now install MIME::Entity:
    perl -MCPAN -e 'install MIME::Entity'
  ### Try to install anything else missing for us:
    perl sbin/rt-test-dependencies --with-mysql --with-fastcgi --install
  ### Test again and make sure nothing is MISSING:
    perl sbin/rt-test-dependencies --with-mysql --with-fastcgi --verbose | grep MISSING
  ### Assuming everything is present and it's a go, install and intialize database...
    make install
    make initialize-database
  ### Make a copy of the dist config file to edit:
    cp /opt/rt3/etc/RT_Config.pm /opt/rt3/etc/RT_SiteConfig.pm
  ### Edit your RT config file for your purposes:
    edit /opt/rt3/etc/RT_SiteConfig.pm
    ### Change the line:
    ### Set($WebBaseURL , "http://RT::WebBaseURL.not.configured:80");
    ### to read:
    ### Set($WebBaseURL , "http://your.ip.address:80");
  ### Edit your Apache config file as well:
    edit /etc/httpd/conf/httpd.conf

      <VirtualHost your.ip.address>
         ServerName rt.example.com
         DocumentRoot /opt/rt3/share/html
         AddDefaultCharset UTF-8
         PerlModule Apache2 Apache::compat
         PerlModule Apache::DBI
         PerlRequire /opt/rt3/bin/webmux.pl
         <Location />
             SetHandler perl-script
             PerlHandler RT::Mason
         </Location>
         RedirectMatch permanent (.*)/$ http://128.150.142.104$1/index.html
      </VirtualHost>


  ###Restart Apache:
    service httpd stop
    service httpd start



Apache will not start, yeilidng the following errors:

[error] Can't load '/usr/lib/perl5/5.8.5/i386-linux-thread-multi/auto/MIME/Base64/Base64.so' for module MIME::Base64: /usr/lib/perl5/5.8.5/i386-linux-thread-multi/auto/MIME/Base64/Base64.so: failed to map segment from shared object: Permission denied at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.\n at /usr/lib/perl5/site_perl/5.8.5/MIME/Words.pm line 85\nCompilation failed in require at /usr/lib/perl5/site_perl/5.8.5/MIME/Words.pm line 85.\nBEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5/MIME/Words.pm line 85.\nCompilation failed in require at /usr/lib/perl5/site_perl/5.8.5/MIME/Head.pm line 123.\nBEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5/MIME/Head.pm line 123.\nCompilation failed in require at /usr/lib/perl5/site_perl/5.8.5/MIME/Entity.pm line 235.\nBEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5/MIME/Entity.pm line 235.\nCompilation failed in require at /opt/rt3/lib/RT/I18N.pm line 66.\nBEGIN failed--compilation aborted at /opt/rt3/lib/RT/I18N.pm line 66.\nCompilation failed in require at /opt/rt3/lib/RT.pm line 48.\nBEGIN failed--compilation aborted at /opt/rt3/lib/RT.pm line 48.\nCompilation failed in require at /opt/rt3/bin/webmux.pl line 64.\nBEGIN failed--compilation aborted at /opt/rt3/bin/webmux.pl line 64.\nCompilation failed in require at (eval 2) line 1.\n
[error] Can't load Perl file: /opt/rt3/bin/webmux.pl for server rt.nitrd.gov:0, exiting...


Commenting out the PerlRequire /opt/rt3/bin/webmux.pl yeilds a different error:

[error] Can't locate Apache/DBI.pm in @INC (@INC contains: /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl . /etc/httpd/ /etc/httpd/lib/perl) at (eval 2) line 3.\n




More information about the rt-users mailing list