Help - Search - Members - Calendar
Full Version: Easy Way To Install Mod_perl
Linuxhelp > Support > Technical Support
ankleteeth
I want to get mod_perl installed on my existing system with Slackware 9.0 but dont want to have to recompile apache, seeing as its all built with the slackware packages, and all, it always makes a mess trying to restup apache from scratch. Is there any easy way to add mod_perl to my setup, without interfering with the current apache install?
hughesjr
It depends on how apache was compiled in the first place. If you already are using other modules, then the only thing that needs to be done is to obtain mod_perl, stick it in the current modules directory and modify the httpd.conf file to use it.

If Apache wasn't built to use modules, it will need to be recompiled.

Are you using Apache 1.xxx or 2.xxx?

I have a slackware 9.1 drive for my test machine, but I can't boot it right now because I'm the middle of an upgrade to gentoo (which compiles all upgraded programs) ... it maybe several hours before it finishes my upgrade to Gnome 2.4!
ankleteeth
Thanks for your opinion, your help is much appreciated. I am running Apache 1.3.28 and already have various modules running like php and such. So my question now would be, so I only nee the lib_perl.so and the correct entries in the httpd.conf? If so, where do I find the module by itself, the only thing I have found so far is the source for it, and when I try to compile it, it wants the apache src directory, which I cant give it. because slackware doesnt include the src. So somehow if that is a way of going about it, I need to get the compiled module by itself somehow. Thanks again for your help.
hughesjr
I looked in the apache 1.3.28 tgz file for slackware 9.0 and mod_perl is not included...but it should be!

When trying to build mod_perl, try pointing to /usr/include/apache as the apache source directory ... slackware installs some apache header files there...

I still don't have access to my slackware box (man, this gentoo update is SLOW) to try this ... I will try building mod_perl in slackware 9.1 tonight...
ankleteeth
Yeah, I tried that, it just generates some error, I dont remember, also a weird thing, if I try to enable SSL on one of my Virtual hosts, and I go to restart apache, it dies, with absolutely no error but "httpd failed to start" Talk about weird, I checked syslogs, apaches logfile, and nothing to show on why it is doing that. So between lack of mod_perl, and SSL failing to start, I tell ya, it gets tough to try and build any decent web page.... Thanks again for all opinions
hughesjr
As I recall, Joey always builds his Apache instead of using RPMs (my he has some advice for building it...

Would you consider a different distro?

In debian (or RedHat with apt installed), the command to get apache with mod_perl and php installed is:

apt-get install httpd mod_perl php

I forgot to try a mod_perl install in slack, I'll try tonight...
ankleteeth
I would attempt this myself if I could get ahold of the lib_perl.so file, but havent had any luck finding it...
hughesjr
Ok,

I did some research and here is how I got mod_perl to work with apache 1.3.28 on slackware 9.1.

We will build mod_perl as a DSO outside the Apache Source Tree using apxs.

First download the latest mod_perl from here (since we are using apache 1.3.28, download mod_perl 1.0):
http://perl.apache.org/download/index.html

Now move the gz file to /usr/src and untar it:

mv mod_perl-1.0-current.tar.gz /usr/src
cd /usr/src
tar -xvzf mod_perl-1.0-current.tar.gz


(after all is finished and running, you can remove the file mod_perl-1.0-current.tar.gz)...

Now change directories to /usr/src/mod_perl-1.29

cd /usr/src/mod_perl-1.29
___________________________________________
if you have already tried to build before ... do the command:

make clean

Ok, now you must locate your apxs executeable file ... mine (on slackware 9.1) is /usr/sbin/apxs ... your's maybe somewhere else. Try the command:

which apxs

Whatever it gives as the path, use that in place of /usr/sbin/apxs in the below command:

perl Makefile.PL USE_APXS=1 WITH_APXS=/usr/sbin/apxs EVERYTHING=1

If all goes well (no errors), then issue the following command:

make

If that completes ok, then do this command:

make install
___________________________________________
{All the commands between the blue lines must take place in the /usr/src/mod_perl-1.29 directory}

Now edit the file /etc/apache/httpd.conf ... you should see this line (at the bottom of the Load Modules section):

LoadModule perl_module libexec/libperl.so

and this line (at the bottom of the Add Modules section)

AddModule mod_perl.c

If so, restart httpd and you should be in business.....
ankleteeth
hughesjr,

I thank you greatly for your help, those steps were perfect in leading me through the setup, and now it appears that apache is starting with the PERL module enabled. Again I thank you, now I just gotta find out why apache spits the script out as plain text, instead of processing it. Anyhow, thanks a bunch, and Best Wishes!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.