Document toolboxDocument toolbox

Installing Custom Perl Modules

Note

The administrative shell's /Backup/Sandbox directory provides the common location through which the NetMRI file system and the Sandbox operating system share files. Data files placed on the common location are shared between the Sandbox and NetMRI using the Samba protocol.

Custom Perl script modules can be installed into the NetMRI sandbox environment for use by Perl scripts. This can be accomplished in a number of ways; recommended procedures include the following:

  • The standard Perl module installation: unpack the tarball, and run a sequence of make commands;
  • Using the cpan command-line utility. (Note: a full discussion of cpan usage is beyond the scope of this document.)

To install a Perl module using standard Perl module installation procedures, do the following:
Upload the Perl module in Tarball form to the sandbox environment by using SCP to send the file into the administrator shell's /Backup/Sandbox directory (below is an example):

scp SomePerlModule.tar.gz admin@172.23.28.2:/Backup/Sandbox

In the administrative shell, the /Backup/Sandbox directory maps to the /mnt/host/data/userdata directory inside the sandbox. After the file has been successfully uploaded to the sandbox, login to the sandbox via the administrative shell.

sandbox login

Once inside the sandbox, use the standard Perl module installation procedure to install the Perl module located at
/mnt/host/data/userdata. As an example:

cd /mnt/host/data/userdata

tar xzf SomePerlModule.tar.gz

make

make test

make install

To install a Perl module, log in to the sandbox using the sandbox login command from the administrative shell as noted above. You use the cpan command-line utility, which is part of the sandbox operating system, to install the desired Perl module. Explanation of the features and capabilities of the cpan utility is beyond the scope of this document; find more information by reading the man page inside the sandbox (run man cpan in the shell).