Installing Perl on ssapp0434 (SunOS 5.9)

Table of contents

Installing Perl on ssapp0434 (SunOS 5.9)

Installing Perl on ssapp0434 (SunOS 5.9)

These notes

~/sun/install.perl.notes.pod ~/httpd/prefork/htdocs/install.perl.notes.html

Resources

http://www.blastwave.org http://www.sunfreeware.com

Download perl-5.10.0.tar.gz

From: ?. * Upload it to /export/home/rsavage/sun * Log on to ssapp0434 * Unpack the distro

tar xvzf perl-5.10.0.tar.gz cd perl-5.10.0

Convert INSTALL into HTML

On laptop:

sudo pod2html.pl INSTALL > /var/www/install.perl.html

Set INCLUDE

INCLUDE=/usr/include export INCLUDE

Set LIBRARY

LIBRARY=usr/lib export LIBRARY

Set LD_LIBRARY_PATH

There should be no need.

Set PERL5LIB

PERL5LIB=/opt/eHealth/custom/perl/lib/site_perl/5.10.0 export PERL5LIB

This is where your locally-installed modules will go.

Ensure it is not pointing to an old Perl's collection of modules.

Ensure /usr/ccs/bin is on the PATH

This give you access to utilities such as as and ld.

Choose an installation directory containing the word 'perl'

E.g.: /opt/perl or /opt/eHealth/custom/perl

Warning: Do not use a trailing / on this (below).

Run Configure

Note: usethreads is for BerkeleyDB.

sh Configure -Dcc=gcc -Dusethreads -Dprefix=/opt/eHealth/custom/perl -des make make test

Install
Install on 1 machine

make install

Install on N machines

make install DESTDIR=/tmp/perl cd /tmp/perl

The next line is needed for unthreaded Perls.

cp -r /usr/local/scripts/* opt/eHealth/custom/perl/bin/

cd /tmp/perl/opt/eHealth/custom/perl tar czvf /tmp/perl.5.10.0.sun.5.9.threads.tgz .

cd /opt/eHealth/custom su mkdir perl cd perl gunzip /export/home/rsavage/perl/perl.5.10.0.sun.5.9.no.threads.tgz tar xvf /export/home/rsavage/perl/perl.5.10.0.sun.5.9.no.threads.tar chown -R ehealth:ehealth . exit

Test it

#!/opt/eHealth/custom/perl/bin/perl

use strict; use warnings;

use Config;

# ----------------

print join("\n", map{"$_ => $Config{$_}"} sort grep{defined($Config{$_}) && /version/} keys %Config), "\n"; print "\n"; print `which perl`;

Installing BerkeleyDB

* Download db-4.7.25.tar.gz

From: http://www.oracle.com/technology/products/berkeley-db/db/index.html. * Unpack the distro on the laptop

tar xvzf db-4.7.25.tar.gz cp -r db-4.7.25/docs ~/httpd/prefork/htdocs/Berkeley/

* Upload it to /export/home/rsavage/sun * Unpack the distro

tar xvzf db-4.7.25.tar.gz cd db-4.7.25

* Read http://127.0.0.1/Berkeley/index.html

Click on Unix/POSIX.

It installs into /usr/local/BerkeleyDB.4.7/. * Download BerkeleyDB-0.39.tar.gz

From: CPAN. * Upload it to /export/home/rsavage/sun * Unpack the distro

tar xvzf BerkeleyDB-0.39.tar.gz cd db-4.7.25

* Edit config.in

Change /usr/local/BerkeleyDB/* in a couple of places to /usr/local/BerkeleyDB.4.7/*. * Run make

make

Gets this error:

make: *** No rule to make target `/opt/eHealth/custom/perl/lib/5.10.0/sun4-solaris-thread-multi/CORE/thrdvar.h', needed by `BerkeleyDB.o'.

So, both threaded and unthreaded Perls produce the same error.

Sun Packages

* In General

o Choose an installation directory

E.g.: $NH_HOME/custom/gcc o Create an admin file for pkgadd

E.g.: $NH_HOME/custom/gcc/adminfile would contain

basedir=/opt/eHealth/custom/gcc

o Install the package

cd $NH_HOME/custom/gcc (?) pkgadd -a $NH_HOME/custom/gcc/adminfile -d . pkg_foo

* Installing in the default location

Download into /tmp, say.

cd /tmp gunzip foo.gz su pkgadd -d foo

This normally installs into /usr/local, which means adding /usr/local/bin to PATH, and /usr/local/man to MANPATH.

Some packages install into /opt/foo.