Adding perl modules to webstack in a Solaris Zone

Webstack is Sun's tuned version of Apache that is designed to run
on their sparc processors and so is probably the best version to run on
your servers. There is also a full support package available for it.

 In using webstack on Solaris you get to use the built in version of perl
that comes with the OS unlike coolstack that came with it's own compiled
version. With Solaris zones you do not have access to write to the /usr
directory. This leaves you in the situation that you can't install any
perl modules for mod_perl.

 startup.pl is your answer. Put the following content in it:

 BEGIN {
 use lib '/etc/opt/webstack/apache2/2.2/lib/site_perl';
 use lib '/opt/webstack/apache2/2.2/lib/perl/';
}

 Then add a:

  PerlRequire conf/startup.pl

 to your httpd.conf file and mod_perl will call that file and add those
to the lib path. The advantage of this is that your uses should not need
to do anything to use this.

 Now when you build the perl modules just use the following commands.

  PERL5LIB=/etc/opt/webstack/apache2/2.2/lib/site_perl/ ;export PERL5LIB
 /usr/bin/perl Makefile.PL prefix=/etc/opt/webstack/apache2/2.2/

 The first part sets it up so that it can find any other modules you have
compiled and the prefix part tells the makefile where to install it.

 It's no apt-get but it does seem to work. As a side note I think that it would be good if the version of perl on
Solaris defaulted to install modules in /opt/perl or some such so that
they could cope with their own technology.

59 views and 0 responses