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

William Harrison harrison at itrd.gov
Thu Mar 17 09:43:11 EST 2005


As requested, here is the most recent version of the procedure for installing RT on RHEL 4 with MySQL and FastCGI. Note that things still do not work...

Apache's error_log file fills up rapidly, approx. one error per second, similar to the following:
[timestamp] [crit] (13)Permission denied: FastCGI: can't create server "/opt/rt3/bin/mason_handler.fcgi": bind() failed [/var/log/fastcgi/362fab4db3d651b6d082c0358ebb4d83]

Best of luck to those of you trying to get it working. Let me know if you have any suggestions...

-William


RT INSTALLATION PROCEDURE 20050317:

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


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");
    ### Change the line:
    ### Set($WebPath , "");
    ### to read:
    ### Set($WebPath , "/rt");


  ### Edit your Apache config file as well:
    edit /etc/httpd/conf/httpd.conf

      NameVirtualHost *:80
      <VirtualHost *:80>
        ServerAdmin root
        DocumentRoot /var/www/html/
        # Adding the following for RT (the ticket tracker)
        AddHandler fastcgi-script fcgi
        <Directory "/opt/rt3/share/html">
          Options FollowSymLinks ExecCGI
          AllowOverride None
        </Directory>
        # Pass through requests to display images
        Alias /NoAuth/images/ /opt/rt3/share/html/NoAuth/images/
      </VirtualHost>
      FastCgiServer /opt/rt3/bin/mason_handler.fcgi -idle-timeout 120
      ScriptAlias /rt /opt/rt3/bin/mason_handler.fcgi


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



WARNING: Starting Apache now will result in a successful start, and an abilty to serve non-RT related pages only.
         Your error_log file will fill up rapidly, approximatly one error per second, similar to the following:
[timestamp] [crit] (13)Permission denied: FastCGI: can't create server "/opt/rt3/bin/mason_handler.fcgi": bind() failed [/var/log/fastcgi/362fab4db3d651b6d082c0358ebb4d83]






-----Original Message-----
From: Bech-Yagher, Cirstyn [mailto:CBY at Teleplan.no]
Sent: Thursday, March 17, 2005 9:16 AM
To: Sam Snow; rt-users at lists.bestpractical.com
Subject: RE: [rt-users] RT on RHEL 4 with FastCGI Install Procedure


Hi, 

I'm also struggling with the apache/mod_perl set-up, and was wondering
whether to change to fastcgi myself. Would it be possible to get a
forward as well or maybe you could post it to the list ? 

Thanks ever so much :-)

C




More information about the rt-users mailing list