LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-08-2006, 06:57 PM   #1
initself
Member
 
Registered: Feb 2003
Location: Lake Forest, CA
Distribution: Slackware 10.2, Ubuntu 6.06 LTS
Posts: 39

Rep: Reputation: 16
Lightbulb Installing mod_perl and FastCGI on Apache 1.3


All the HOWTO files I found related to mod_perl and FastCGI approached their installations assuming you would use one or the other. But what if you wanted to use both? Here are installation steps to install both mod_perl and FastCGI on Apache.

Apache

Download and compile Apache 1.3 from source. Configure it with '--enable-shared=rewrite'. This will turn on Dynamic Shared Object (DSO) Support, enabling us to load mod_perl and FastCGI dynamically rather than compiling them directly into Apache. If you wish to use Embperl, add '--enable-shared=env'.

Code:
./configure --enable-shared=rewrite --enable-shared=env
make && make install
mod_perl

Download mod_perl. From the root directory, execute Makefile.PL with the following parameters:

Code:
perl Makefile.PL USE_APXS=1 WITH_APXS=/path/to/apxs
If you used the default installation directory for Apache, apxs will be located in /usr/local/apache/bin/apxs:

Code:
perl Makefile.PL USE_APXS=1 WITH_APXS=/usr/local/apache/bin/apxs
make && make install
Your httpd.conf configuration will updated automatically to load the following module:

Code:
LoadModule perl_module        libexec/libperl.so
FastCGI

Download FastCGI (mod_fastcgi). From the root directory, run the following commands:

Code:
/usr/local/apache/bin/apxs -o mod_fastcgi.so -c *.c
/usr/local/apache/bin/apxs -i -a -n fastcgi mod_fastcgi.so
Your httpd.conf configuration will updated automatically to load the following module:

Code:
LoadModule fastcgi_module     libexec/mod_fastcgi.so
To use FastCGI, you will need to edit httpd.conf to enable your FastCGI application. See the documentation for details.

Embperl

Perhaps you will also want to add Embperl for use with this DSO system. Here's how:

Installing Embperl with Apache previously installed and mod_perl installed as a DSO:

Code:
Build with support for Apache mod_perl?(y/n) [y]y
Searching for Apache sources...
Look at ..
Look at ../src
Look at ../apache_1.3.37/src
Use ../apache_1.3.37/src as Apache source(y/n) [y]n
Look at ./src
When get asked for the Apache sources, enter the directory where you found httpd.h, in my case '/usr/local/apache/include'.

Code:
Apache source not found, enter path name or q to quit []/usr/local/apache/include/
Searching for Apache sources...
Look at /usr/local/apache/include
Use /usr/local/apache/include as Apache source(y/n) [y]y
For the Apache executable enter the path to httpd:

Code:
Enter path and file to start as httpd [/usr/local/apache/httpd]/usr/local/apache/bin/httpd
Apache Version Server version: Apache/1.3.37 (Unix)
Then enter the directory where mod_env.so is located:

Code:
Library for mod_env.c not found, please enter path to mod_env.so  []/usr/local/apache/libexec
 + Load dynamic module mod_env.c
   (/usr/local/apache/libexec/mod_env.so)
 + Load dynamic module mod_perl.c
   (/usr/local/apache/libexec/libperl.so)
 + mod_perl was build with USE_DSO
Test start /usr/local/apache/bin/httpd
Test httpd will run as user nobody and group root
Test httpd will listen on port 8531
Found mod_perl  Version 1.29
Found LWP::UserAgent  Version 2.033
Found HTML::HeadParser  Version 2.22
Apache::Session not installed on this system
-> Disable tests for persistent data storage
Found File::Spec  Version 3.19
Found CGI  Version 3.23
Writing Makefile for HTML::Embperl
Hope this helps!

mb

Last edited by initself; 09-08-2006 at 08:31 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache mod_perl raypen Slackware 8 10-09-2006 10:03 AM
PHP FastCGI/Apache Module Question.... Voltar Linux - Software 4 06-22-2006 12:45 PM
Problems installing fastcgi on Fedora Core 3/Apache segmentation 11 faults bax Linux - Software 3 05-29-2005 10:38 PM
Installing a different version of Apache/mod_perl, how? admanb Linux - Newbie 3 01-19-2004 02:44 PM
Apache 2.0.45 and mod_perl arkopolo Linux - Software 0 07-03-2003 02:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration