prarie dawn has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm reasonably comfortable with perl, but have never been savvy with the module installation/admin side of things.
I'm thinking of using the AxKit module. I do not have a Web Host yet, but I guess I should consider that most Web Hosts only have standard modules installed.
AxKit requires changes to apache config files - does this make it unlikely to be an option for me with most Web Hosts? I assume most would urr-and-umm about making Apache modifications.
Also, ignoring Apache config changes, how easy is it to install an average perl module? Do I need to be an admin? I'm guessing I could build perl modules in my local cgi-bin with a bit of fiddling, or do I need to be an admin so I can place them in proper library directories?
thanks for any advice
Re: module installation
by azatoth (Curate) on Jun 15, 2001 at 16:11 UTC
|
Modules are fairly easy to install, provided you follow the instructions included in the Readme (update : an example of which can be seen in the post below). Most also come with a makefile script which does the hard work for you.
Another option, if for some reason you have trouble installing in the "proper" directories, is to use lib. A handy tool that lets you point to any directory (in which you have installed your mods).
Also, a while ago, I posted a link of a webhost that let's you upload modules - hang on, lemme find it...aah, here it is.
Azatoth a.k.a Captain Whiplash
Make Your Die Messages Full of Wisdom!
Get YOUR PerlMonks Stagename here!
Want to speak like a Londoner? | [reply] |
|
| [reply] |
|
UNIX has "cpan" (or perl -MCPAN -e 'shell') which is full featured. It will list, search, download, install, cache, etc.
--Paris
| [reply] |
Re: module installation
by Aighearach (Initiate) on Jun 15, 2001 at 16:41 UTC
|
On unix systems you can generally install your own perl in user space, and not have to worry about modules being a problem. This is ideal, if you have the disk space on the host.
Alternatively, you can install individual packages in your home dir for use with the site's main perl using this formula: (assumes bash shell)
perl Makefile.PL prefix=$HOME
make
make test
make install
You'll want to look at your Perl docs to read about @INC, also.
--Paris
| [reply] |
Re: module installation
by mattr (Curate) on Jun 15, 2001 at 16:51 UTC
|
Hrmm, yep, lib looks nice. I remember seeing it a few times but for some reason never used it in this case, just said #!/usr/bin/perl -I./mylibs -I./some/other/libs and so on.
Some providers give you your own apache config file especially if mod_perl is supported, maybe someone has more info about that.
If you have telnet (or ssh) and gnu tools like gcc and make then you can compile in your local directory. Read the man page for make and you
should see where to add the PREFIX directive when building.
configure --help might do it too. But don't try to compile on a different machine first that probably won't work.
The easiest thing is to use CPAN (I haven't used it for installation in a different directory myself) to install modules. You might want to check the
CPAN nonstandard directory installation docs. This is how to build a Perl Module on the command line, not inside the cpan utility (which is started with perl -MCPAN -e shell).
Incidentally, you can build but just not install a module in your local directory, just do make but not make install.
It may work fine. | [reply] [d/l] |
Re: module installation
by tomhukins (Curate) on Jun 15, 2001 at 17:55 UTC
|
AxKit runs under
mod_perl, which must
be compiled into your Apache server.
Because mod_perl hooks straight into the Apache server, it
is standard practice to run your own dedicated server for
such projects. Most hosting companies that serve multiple
customers on one machine won't support mod_perl, because a
bug or problem with one customer's site will affect others
on the same machine much more than under standard CGI.
Having said that there are some
hosting companies
that support mod_perl.
Other answers have already dealt with module installation
issues, so I just want to focus on one point: if you're
running AxKit, it's best to do so on your own machine.
| [reply] |
Re: module installation
by mk (Initiate) on Jun 15, 2001 at 18:05 UTC
|
The README is important--and I can see the big 'GOTCHA' for web hosts being the importance of compiling apache with --disable-rule-EXPAT . If the web host is Apache-based with a RedHat RPM installation or something like that, it has likely been built with the built-in expat XML parser enabled (the default). And if you're getting segfaults instead of XSLT transforms, that's why. | [reply] |
Re: module installation
by toma (Vicar) on Jun 15, 2001 at 20:07 UTC
|
Be careful not to install perl in your cgi-bin directory since
this causes security problems.
It is a good idea for you to learn to compile perl and
install modules. Perl modules are easy to install,
but there is one thing to be careful about, which
is that the module installation step:
perl Makefile.PL
runs the correct version of perl, so either be careful
to have your version of perl first in your $PATH
environment variable, or specify a full path to your version of perl:
/home/username/perl5/bin/perl
Almost all CPAN modules do a good job of installing themselves
in the right place if you do this. Very rarely (I have only
seen it once) you might find an obscure bug where
something assumes that perl is in
/usr/bin/perl.
It should work perfectly the first time! - toma | [reply] [d/l] [select] |
|
|