Your Ad Here

IBM AIX/UNIX system storage administration ksh/perl scripting

Showing posts with label Perl Module. Show all posts
Showing posts with label Perl Module. Show all posts

Thursday, March 19, 2009

How to install Perl module on AIX

  • Download Perl Module source from cpan.org or ftp.cpan.org
  • In this example, we will download and install Net::Rexec
 root@AIXSERVER:/mnt/software/PerlModules# ls -l Net-Rexec-0.12.tar.gz
-rw-r----- 1 root staff 2085 Mar 19 14:36 Net-Rexec-0.12.tar.gz
root@AIXSERVER:/mnt/software/PerlModules# gzip -dc Net-Rexec-0.12.tar.gz |tar xvf -
x Net-Rexec-0.12
x Net-Rexec-0.12/Makefile.PL, 398 bytes, 1 media blocks.
x Net-Rexec-0.12/Changes, 183 bytes, 1 media blocks.
x Net-Rexec-0.12/test.pl, 663 bytes, 2 media blocks.
x Net-Rexec-0.12/Rexec.pm, 2032 bytes, 4 media blocks.
x Net-Rexec-0.12/MANIFEST.SKIP, 48 bytes, 1 media blocks.
x Net-Rexec-0.12/README, 207 bytes, 1 media blocks.
x Net-Rexec-0.12/MANIFEST, 67 bytes, 1 media blocks.
root@AIXSERVER:/mnt/software/PerlModules# cd Net-Rexec-0.12
root@AIXSERVER:/mnt/software/PerlModules/Net-Rexec-0.12# ls -l

total 16
-rw-r--r-- 1 1000 1000 183 Sep 15 1998 Changes
-rw-r--r-- 1 1000 1000 67 Sep 15 1998 MANIFEST
-rw-r--r-- 1 1000 1000 48 Sep 15 1998 MANIFEST.SKIP
-rw-r--r-- 1 1000 1000 398 Sep 15 1998 Makefile.PL
-rw-r--r-- 1 1000 1000 207 Sep 15 1998 README
-rw-r--r-- 1 1000 1000 2032 Sep 28 1998 Rexec.pm
-rw-r--r-- 1 1000 1000 663 Sep 15 1998 test.pl
root@AIXSERVER:/mnt/software/PerlModules/Net-Rexec-0.12# perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for Net::Rexec
root@AIXSERVER:/mnt/software/PerlModules/Net-Rexec-0.12# make
cp Rexec.pm blib/lib/Net/Rexec.pm
Manifying blib/man3/Net::Rexec.3
root@AIXSERVER:/mnt/software/PerlModules/Net-Rexec-0.12# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
1..1
ok 1
Target "test" is up to date.
root@AIXSERVER:/mnt/software/PerlModules/Net-Rexec-0.12# make install
Installing /usr/opt/perl5/lib/site_perl/5.8.2/Net/Rexec.pm
Installing /usr/share/man/man3/Net::Rexec.3
Writing /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/Net/Rexec/.packlist
Appending installation info to /usr/opt/perl5/lib/5.8.2/aix-thread-multi/perllocal.pod
Target "install" is up to date.

List installed Perl modules

perl -MFile::Find=find -MFile::Spec::Functions -lw -e 'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC'

Output:

/usr/opt/perl5/lib/5.8.2/aix-thread-multi/Cwd.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/Config.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/lib.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/re.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/XSLoader.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/DynaLoader.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/B.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/O.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/ByteLoader.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/Encode.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/encoding.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/Fcntl.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/IO.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/NDBM_File.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/ODBM_File.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/Safe.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/Opcode.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/ops.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/POSIX.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/SDBM_File.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/Socket.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/Storable.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/attrs.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/threads.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/Errno.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/Devel/DProf.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/Devel/PPPort.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/Devel/Peek.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/File/Glob.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/IPC/Msg.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/IPC/Semaphore.pm
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/IPC/SysV.pm
........

Labels

BlogCatalog