[rt-users] mod_perl2 compatibility
Ruslan U. Zakirov
Ruslan.Zakirov at miet.ru
Mon Jul 11 19:00:15 EDT 2005
Ian Ward wrote:
> Chris Meyer wrote:
>
>> Can someone clarify the current state of mod_perl2 + Apache 2.x
>> compatibility for RT 3.4?
>> It would be nice if this information was stated unambiguously in the
>> installation guides.
>
>
> Hi Chris,
>
> We have been running rt ( differing version ) with mod_perl2 now for
> nearly 3 years.
Please, clarify what exactly mod_perl version is!!! You can't run MP2
for years, because MP2 is available only for month or two.
You can run development version 1.99_XX that is DEVELOPMENT branch.
If you use MP1.99_XX or MP2.X then you are in situation: "I know what
I'm doing! I subscribed to the mod_perl mailing list and follow all
major changes. And if something goes wrong while perl/mod_perl update I
know where to go and this is not RT mailing list."
> Never had a problem, however it is slow.
Last versions of the MP2.X and 1.99_XX as fast as latest FastCGI versions.
MP1 is slower then FCGI by ~10% this was tested for simple operations
like browsing HomePage with ab tool in RT 3.0.X.
> But we did it because it worked and it was easy.
>
> However, the system running RT has been upgraded to FC4 and RT is
> currently broken. ( even after all rt-test-dependancies )
> We get the error:
> [error] Can't locate Apache2.pm in @INC in the httpd log even though
> perl-Apache::DBI is installed and mod_perl2
> We were running RT 3.2.2. ( and earlier versions ) on Fedora Core 2
> The upgrade ( fresh install ) to FC4 has been fine for everything except RT
>
> Now that it is broken, I have to put some effort into fixing it.
> I will take the advice of the good people here and try FastCGI ( they
> really do seem to feel strongly that mod_perl2 should be avoided )
> I have kept a posting to the list from March ready for this time, here
> it is in full... (hope this helps)
>
> The post is from Wiliam Harrison <harrison at itrd.gov>
>
> PS> I don't post very often so can I just say a BIG thanks to Jesse and
> crew. RT Rocks!
>
> ================================================================================
>
>
> Well, thanks to hard work and effort from others, this procedure has
> been verified to work across at least three installations of RHEL 4. If
> you think it would be of value, I'm happy to add it to the wiki.
>
> Installation procedure follows...
>
> -William
>
>
>
> Installing RT on RHEL 4 with FastCGI and MySQL:
>
> Start with a standard install of RHEL, then upgrade / up2date / whatever
> to get latest versions of installed packages. Then make sure you have
> the following packages as well:
> httpd-devel
> mysql
> mysqlclient10
> mysql-server
> mysql-devel
> gcc
>
> 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
>
>
> RT Pre-Install...
> ### RT requires its own group, so let's add it now lest we forget:
> groupadd rt
> ### RT gets initiated by apache, so add apache to the rt group:
> edit /etc/group
> ### Change the line:
> ### rt:x:501:
> ### to read:
> ### rt:x:501:apache
> ### Disable selinux (or make sure it is disabled):
> edit /etc/selinux/config
> ### Change the line:
> ### SELINUX=enforcing
> ### or
> ### SELINUX=permissive
> ### to read:
> ### SELINUX=disabled
> ### Change permissions on /etc/httpd/logs from within
> cd /etc/htttpd/logs
> chmod 755 .
>
>
> Install RT...
> wget http://download.bestpractical.com/pub/rt/release/rt-3.4.1.tar.gz
> gunzip rt.tar.gz
> tar -xvf rt.tar
> cd rt-3.4.1/
> ### 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
>
>
>
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Be sure to check out the RT Wiki at http://wiki.bestpractical.com
>
More information about the rt-users
mailing list