Installation of mod_perl-enabled Apache Without Superuser Privileges Page 7

The simplest way to do this is to quit the interactive shell by typing quit and reenter it. But if you insist here is how to make it work without quitting the shell. You really want to skip this :)

If you want to continue working with CPAN without quitting the shell, you must:

  1. remember the value of makepl_arg
  2. change it to suit your new installation
  3. build and install mod_perl
  4. restore it after completing mod_perl installation

this is quite a cumbersome task as of this writing, but I believe that CPAN.pm will eventually be improved to handle this more easily.

So if you are still with me, start the shell as usual:

  % perl -MCPAN -eshell

First, read the value of the makepl_arg:

  cpan> o conf makepl_arg 

It will be something like PREFIX=/home/stas if you configured CPAN.pm to install modules locally. Save this value:

  cpan> o conf makepl_arg.save PREFIX=/home/stas

Second, set a new value, to be used by the mod_perl installation process. (You can add parameters to this line, or remove them, according to your needs.) To wit:

  cpan> o conf makepl_arg 'DO_HTTPD=1 USE_APACI=1 EVERYTHING=1         PREFIX=/home/stas APACHE_PREFIX=/home/stas/apache'

Third, let CPAN.pm build and install mod_perl for you:

  cpan> install mod_perl

Fourth, reset the original value to makepl_arg. We do this by printing the value of the saved variable and assigning it to makepl_arg:

  cpan> o conf makepl_arg.save

  cpan> o conf makepl_arg PREFIX=/home/stas

Not so neat, but a working solution. You could have written the value on a piece of paper instead of saving it to makepl_arg.save, but you are more likely to make a mistake that way.


About the Author

Stas Bekman is an author of the mod_perl Guide and is currently co-athoring a book about mod_perl for O'Reilly and Associates, Inc together with Eric Cholet. He is a member of the Apache Software Foundation. You can find more about his works and joys at his personal web site.

This article was originally published on Jul 14, 2000

Thanks for your registration, follow us on our social networks to keep up-to-date