Hmmm....probably as described. Using the distro packages as far as possible helps keep you up to date on security fixes etc (as long as you are running your update commands).
If you *do* need something not packaged by your distro, set up a localised install tree as described above. I'd probably create a user 'cpan' to own it and install the modules to its homedir. If I was very paranoid, I'd actually install to /home/cpan/install/perl, check everything worked and then copy (rsync) the ~/install/perl to wherever I had configured the web server to pick them up from (somewhere not under your document root, obviously).
Note: you generally don't set environment variables for CGIs etc in .bash_profile for your web server user, but how you do it is web-server specific. The apache docs cover setting env vars pretty well.
Have fun and good luck. |