Using Multiple Software Versions in Unix Or, "How to please developers by being efficiently effective with packages." Problem: How to share an application, with multiple versions, in an infrasturcture, using a NAS. Using a global shared NFS mount A possible parent structure: /nfsapps/sunsparc, /nfsapps/sun386i, /nfsapps/linuxintel, /nfsapps/linuxsparc Examples of: Solaris Sparc Install package to alternate location export VERSION_NUMBER=1.2.2 export SOFTWARE=java mkdir -m755 -p /nfsapps/sunsparc/$SOFTWARE/$VERSION_NUMBER chown root:devel /nfsapps/sunsparc/$SOFTWARE/$VERSION_NUMBER cd /dir/with/package pkgadd -R /nfsapps/sunsparc/$SOFTWARE/$VERSION_NUMBER -d . Install gnu to alternate location export VERSION_NUMBER=3.1 export SOFTWARE=gcc mkdir -m755 -p /nfsapps/sunsparc/$SOFTWARE/$VERSION_NUMBER chown root:devel /nfsapps/sunsparc/$SOFTWARE/$VERSION_NUMBER tar xvf gcc*tar mkdir gccbuild; cd gccbuild sh ../gcc-3.1/configure -- \ prefix=/nfsapps/sunsparc/$SOFTWARE/$VERSION_NUMBER make #handle errors make test #should be no errors make install Install perl to alternate location export VERSION_NUMBER=5.6.1 export SOFTWARE=perl mkdir -m755 -p /nfsapps/sunsparc/$SOFTWARE/$VERSION_NUMBER chown root:devel /nfsapps/sunsparc/$SOFTWARE/$VERSION_NUMBER export CC=gcc cd /dir/with/perl/tar/extract # the following steps may change with new perl releases, see your README.OSTYPE rm -f config.sh Policy.sh sh Configure - Dprefix=/nfsapps/sunsparc/$SOFTWARE/$VERSION_NUMBER -des \ -Doptimize='-xpentium -xO4' make #handle errors make test #should be no errors make install Perl CPAN mods information To see is a perlmodule is loaded: perdoc MODNAMEperldoc Net::FTP To get a Perl Mod Install CPAN mod to alternate location MOD=NET::Ftp.xxx #where xxx is the MOD version export VERSION=5.6.1 #version of perl and not the export MODPATH=/nfsapps/sunsparc/perl/$VERSION/bin:/nfsapps/sunsparc/bin:$PATH cp -r ~/.cpan/build/$MOD /nfsapps/sunsparc/perl/cpan-build USE: relocated make - you may have dependencies (other mods may be prereq's) cd /nfsapps/sunsparc/perl/cpan-build/$MOD more readme.txt #Look at REQUIREMENTS to see if there are any for prerequisite mods #Look at INSTALLATION for any suggested mods #DONT USE: 'perl Makefile.PL' without the following arguments, # or it will install in /usr/local/bin and NOT /nfsapps/sunsparc/perl/... perl Makefile.PL \ PREFIX=/nfsapps/sunsparc/perl/$VERSION LIB=/nfsapps/sunsparc/perl/$VERSION/lib make #fix any errors make test #should not have any errors make install