Installation of mod_perl-enabled Apache Without Superuser Privileges Page 5
perl Makefile.PL PREFIX=/home/stas INSTALLPRIVLIB=/home/stas/lib/perl5 INSTALLSCRIPT=/home/stas/bin INSTALLSITELIB=/home/stas/lib/perl5/site_perl INSTALLBIN=/home/stas/bin INSTALLMAN1DIR=/home/stas/lib/perl5/man INSTALLMAN3DIR=/home/stas/lib/perl5/man3
PREFIX=/home/stasin the line:'makepl_arg' => q[PREFIX=/home/stas],
with all the variables from above, so that the line becomes:'makepl_arg' => q[PREFIX=/home/stas INSTALLPRIVLIB=/home/stas/lib/perl5 INSTALLSCRIPT=/home/stas/bin INSTALLSITELIB=/home/stas/lib/perl5/site_perl INSTALLBIN=/home/stas/bin INSTALLMAN1DIR=/home/stas/lib/perl5/man INSTALLMAN3DIR=/home/stas/lib/perl5/man3],
If you arrange all the above parameters in one line, you can remove the backslashes (
Just like with Perl modules, if you don't have permissions to install files into the system area you have to install them locally under your home directory. It's almost the same as a plain installation, but you have to run the server listening to a port number greater than 1024 since only root processes can listen to lower numbered ports.
Another important issue you have to resolve is how to add startup and shutdown scripts to the directories used by the rest of the system services. You will have to ask your system administrator to assist you with this issue.
To install Apache locally, all you have to do is to tell
.configurein the Apache source directory what target directories to use. If you are following the convention that I use, which makes your home directory look like the
/(base) directory, the invocation parameters would be:./configure --prefix=/home/stas
Apache will use the prefix for the rest of its target directories instead of the default
/usr/local/apache. If you want to see what they are, before you proceed add the
./configure --prefix=/home/stas --show-layout
You might want to put all the Apache files under
/home/stas/apachefollowing Apache's convention:./configure --prefix=/home/stas/apache
If you want to modify some or all of the names of the automatically created directories:./configure --prefix=/home/stas/apache --sbindir=/home/stas/apache/sbin --sysconfdir=/home/stas/apache/etc --localstatedir=/home/stas/apache/var --runtimedir=/home/stas/apache/var/run --logfiledir=/home/stas/apache/var/logs --proxycachedir=/home/stas/apache/var/proxy
Also remember that you can start the script only under a user and group you belong to. You must set the
httpd.confto appropriate values.
Now when we have learned how to install local Apache and Perl modules separately, let's see how to install mod_perl enabled Apache in our home directory. It's almost as simple as doing each one separately, but there is one wrinkle you need to know about which I'll mention at the end of this section.
Let's say you have unpacked the Apache and mod_perl sources under
/home/stas/srcand they look like this:% ls /home/stas/src /home/stas/src/apache_x.x.x /home/stas/src/mod_perl-x.xx