Archive for the ‘perl’ Category

Installing CPAN Perl Modules without HTTP, FTP, DNS, or CPAN Access

Thursday, August 13th, 2009

This was pretty easy.

Step 1. Download the module you want from CPAN.org.  In this example, it’s the File::Tail module.  (The download link is the ‘download tar.gz’ link.  Not the source.)

Step 2.  Upload it to the destination server directly, OR use the SCP command to transfer it from another web-server to your destination server.

My preferred method was using wget at the middle server so I didn’t have to manually upload it to the middle server myself!

Step 3.  On the destination server, which now has the file, run tar -xzf (filename) to extract the file from the tar and GZip.  It will likely be in a folder that matches the name of the original tar.gz file.

Step 4. Go to the newly created folder (cd) and look at the readme file.  (Try using the VIM editor by typing vim (filename) .  When done reading, type :q to exit the file.  ( :q! to exit without saving any accidental changes.)  The readme file should have listed a few perl commands you should execute– usually ‘perl makefile.PL’, then ‘make’, then ‘make test’, then ‘make install’.

Step 5: After executing the commands requested by the readme file, you should be done!  If you need to resolve any dependencies to install this package, go back to step #1 and try again with the new package.

Best of luck!