All global software is loaded into /nfs/software - an NFS automount point.
First make a directory.
SOFTWARE=some-app-name
devel-node# mkdir -m755 /nfs/software/$SOFTWARE
devel-node# chown root:devel /nfs/software/$SOFTWARE
-java from sun
on devel-node as root
VERSION_NUMBER=1.2.2
SOFTWARE=java
mkdir -m755 -p /nfs/software/$SOFTWARE/$VERSION_NUMBER
chown root:devel /nfs/software/$SOFTWARE/$VERSION_NUMBER
NEW method
cd /nfs/software/$SOFTWARE/$VERSION_NUMBER
unzip /path/to/javaversion.zip
OLD method
cd /dir/with/package
pkgadd -R /nfs/software/$SOFTWARE/$VERSION_NUMBER -d .
chown -R root:devel /nfs/software/$SOFTWARE/$VERSION_NUMBER
-gcc build
VERSION_NUMBER=3.1
SOFTWARE=gcc
VER_DIR=${SOFTWARE}-${VERSION_NUMBER}
mkdir -m755 -p /nfs/software/$SOFTWARE/$VERSION_NUMBER
chown root:devel /nfs/software/$SOFTWARE/$VERSION_NUMBER
tar xvf gcc*tar
mkdir gccbuild; cd gccbuild
solaris
sh ../$VER_DIR/configure --prefix=/nfs/software/$SOFTWARE/$VERSION_NUMBER
linux
sh ../$VER_DIR/configure --prefix=/nfs/linux/$SOFTWARE/$VERSION_NUMBER
make
make test
make install
-gnu app alternate build
VERSION_NUMBER=7.0
SOFTWARE=ghostscript
mkdir -m755 -p /nfs/software/$SOFTWARE/$VERSION_NUMBER
chown root:devel /nfs/software/$SOFTWARE/$VERSION_NUMBER
sh configure --prefix=/nfs/software/$SOFTWARE/$VERSION_NUMBER
make
make test
make install
-perl alternate build
VERSION_NUMBER=5.6.1
SOFTWARE=perl
mkdir -m755 -p /nfs/software/$SOFTWARE/$VERSION_NUMBER
chown root:devel /nfs/software/$SOFTWARE/$VERSION_NUMBER
CC=gcc
#CC=gcc ./configure.gnu
cd /dir/with/perl/tar/extract
#
# these steps may change with new perl releases
#
rm -f config.sh Policy.sh
sh Configure -Dprefix=/nfs/software/$SOFTWARE/$VERSION_NUMBER -des \
-Doptimize='-xpentium -xO4'
make
make test
make install
-------------------------------------------------------------------------------
Test to see if a perl module is loaded and working
perldoc MOD
perldoc Net::FTP
-------------------------------------------------------------------------------
MIRROR SITES
www.cpan.org/SITES.html
mirror.cpan.org
-------------------------------------------------------------------------------
Download latest modules:
/nfs/software/bin/perl -MCPAN -w -e shell;
http://mirror.sit.wisc.edu/pub/CPAN
ftp://mirror.sit.wisc.edu/pub/CPAN
ftp://cpan.cse.msu.edu/
cpan> look MODULE
downloads to CPAN/home (your home dir .cpan/build)
-------------------------------------------------------------------------------
Build the cpan files:
A complete list of installed CPANs (with your updates, if any), is in
/nfs/software/perl/README_cpan_installed_order.
devel-node# MOD=NET::Ftp.xxx
devel-node# VERSION=5.6.1 #version of perl and NOT the MOD
devel-node# PATH=/nfs/software/perl/$VERSION/bin:/nfs/C/bin:$PATH
devel-node# sudo cp -r ~/.cpan/build/$MOD /nfs/software/perl/cpan-build
USE: relocated make - you may have dependencies (other mods may be prereq's)
devel-node# cd /nfs/software/perl/cpan-build/$MOD
devel-node# more readme.txt README
look at REQUIREMENTS to see if there are any for prerequisite mods
look at INSTALLATION for any suggested mods
devel-node# perl Makefile.PL \
LIB=/nfs/software/perl/$VERSION/lib/$VERSION \
PREFIX=/nfs/software/perl/$VERSION/lib/$VERSION
devel-node# make
devel-node# make test
devel-node# make install
DONT USE: 'perl Makefile.PL' without the above options, it will install in
/usr/local/bin and NOT /nfs/software/perl/...
-------------------------------------------------------------------------------
foo@barbell$ perl Makefile.PL LIB=/home/foobar/mylib \
PREFIX=/home/foobar/mylib
How do I use a module installed in a private/non-standard directory?
There are several ways to use modules installed in private directories:
foo@barbell$ setenv PERL5LIB /path/to/module sets the environment variable
PERL5LIB. Use lib qw(/path/to/module); used at the top of your script tells
perl where to find your module.
foo@barbell$ perl -I/path/to/module
All of these will append /path/to/module to @INC. You should keep in mind
that having private/non-standard libraries may cause problems if you wish
to have portable code.
-------------------------------------------------------------------------------
The pmtools suite written by Tom Christiansen to help navigate and manage
Perl module installations.
You can obtain them at http://language.perl.com/misc/pmtools-1.00.tar.gz.
From the README:
This is pmtools -- a suite of small programs to help manage modules.
The names are totally preliminary, and in fact, so is the code. We follow
the "keep it small" notion of many tiny tools each doing one thing well,
eschewing giant megatools with millions of options.
-pmpath - show the module's full path
-pmvers - get a module version number
-pmdesc - get a module description
-pmall - get all installed modules pmdesc descriptions
-pmdirs - print the perl module path, newline separated
-plxload - show what files a given program loads at compile time
-pmload - show what files a given module loads at compile time
-pmexp - show a module's exports
-pminst - find what's installed
-pmeth - list a class's methods, recursively
-pmls - long list the module path
-pmcat - cat the module source through your pager
-pman - show the module's pod docs
-pmfunc - show a function source code from a module
-podgrep - grep in pods of a file
-pfcat - show pods from perlfunc
-podtoc - list table of contents of a podpage
-podpath - show full path of pod file
-pods - list all standard pods and module pods
-sitepods - list only pods in site_perl directories
-basepods - list only normal "man-page" style pods
-faqpods - list only faq pods
-modpods - all module pods, including site_perl ones
-stdpods - list standard pods, not site_perl ones
-------------------------------------------------------------------------------
This enables the programmer to do operations that combine
functionalities that are available in the shell.
# install everything that is outdated on my disk:
perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)'
# install my favorite programs if necessary:
for $mod (qw(Net::FTP MD5 Data::Dumper)){
my $obj = CPAN::Shell->expand('Module',$mod);
$obj->install;
}
# list all modules on my disk that have no VERSION number
for $mod (CPAN::Shell->expand("Module","/./")){
next unless $mod->inst_file;
# MakeMaker convention for undefined $VERSION:
next unless $mod->inst_version eq "undef";
print "No VERSION in ", $mod->id, "\n";
}
-------------------------------------------------------------------------------
Get bundle:
autobundle # output to $CPAN::Config{cpan_home}/Bundle directory
$HOME/.cpan/CPAN/MyConfig.pm
$CPAN::Config are defined:
build_cache size of cache for directories to build modules
build_dir locally accessible directory to build modules
index_expire after how many days refetch index files
cpan_home local directory reserved for this package
gzip location of external program gzip
inactivity_timeout breaks interactive Makefile.PLs after that
many seconds inactivity. Set to 0 to never break.
inhibit_startup_message
if true, does not print the startup message
keep_source keep the source in a local directory?
keep_source_where where keep the source (if we do)
make location of external program make
make_arg arguments that should always be passed to 'make'
make_install_arg same as make_arg for 'make install'
makepl_arg arguments passed to 'perl Makefile.PL'
pager location of external program more (or any pager)
tar location of external program tar
unzip location of external program unzip
urllist arrayref to nearby CPAN sites (or equivalent
locations)
-------------------------------------------------------------------------------