Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Regarding the PERL modules usage on UNIX/LINUX environment ?

Posted on 2011-09-29
8
Medium Priority
?
437 Views
Last Modified: 2012-05-12
Hi Experts,

Please enlighten me regarding the PERL modules usage on UNIX/LINUX env.
I have few doubts regarding the same.

1. before using any module's functionality - that module should be on each & every system where it is intented to be used.
2. If the module needs to be installed on the production env. How safe it is ? Does that need some security permissions ?
3. Which are the useful/importanr PERL modules for the UNIX Admins.

Thanks a lot in advance.
0
Comment
Question by:rajsolaris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 38

Accepted Solution

by:
wesly_chen earned 1200 total points
ID: 36818837
A1. Perl modules usually are installed under perl lib directory, such as /usr/lib/perl/ (Linux)

A2. You don't want some one mess up your installed dir, so it is better to installed as root (own by root, and only root have write permission)

A3. It depends. Perl come with some basic modules like IO, WARNING...
     Some application like php, apache need more perl modules to function.
     Install those modules when it needs.

For better practice, you might want to have one machine be the central management machine for each OS.
Say one  for redhat 5, another for Solaris, the other redhat 6....
Then install your version of perl on, say, /usr/local/perl5, and all the modules under it.
Then NFS share out /usr/local/perl5 so other same type of OS can nfs mount it on their /usr/local/.
So you only need to install on management machine and all other same OS machines have the identical installed version of all perl module.
0
 
LVL 9

Assisted Solution

by:Suhas .
Suhas . earned 400 total points
ID: 36892215
Few important modules for system admins:

DBI
File::Find
Net::Telnet
File::Spec - a core module to handle file and directory paths portably.
String-ShellQuote - quote strings for passing through the shell. Also see the list forms of system.
File::Path - a core module to create or remove directory trees (portably).
File::Copy - a core module to copy files.
IO-All - an all-in-one IO package with a lot of syntactic sugar. Non-core.
0
 
LVL 9

Expert Comment

by:parparov
ID: 36894848
You may also want to have an internal mirror of CPAN for your company, so that the modules' installation is always quick and easy. Mirroring CPAN is very easy.
0
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 
LVL 4

Assisted Solution

by:Anacreo
Anacreo earned 400 total points
ID: 36894874
Wesley,
  How does your strategy handle modules that have compiled code in them?

  See: http://perldoc.perl.org/perlxs.html

  1. Before using any module's functionality - that module should be on each & every system where it is intended to be used.
    You could include the module with your code (if its purely Perl) and distribute it together.  Simply adjusting your @INC within your code would let you do this.
  This has a positive in that you don't have to worry about someone updating the module on you and breaking functionality, but it can also have the converse, you won't get updates to the module unless you do it yourself.

  2.  Installing modules on the production server can be done fairly safely, especially if using the CPAN interface, however there is risk that the updated module could break a program that's been relying on it for years.  As with most things UNIX there is no reason why you can't install Perl Modules under your home directory and have Perl use them from there; which is what I highly recommend for non-system wide or application code.

Generally I recommend:
  Install the module at the OS level if it has common usage and brings benefit to the masses; or is required by system level components such as a monitoring environment, etc.
  Install application modules in some sort of application home directory (this way if you move the application the modules come with it, and OS updates don't break your application)
  Install user level modules in the users home directory (or let them do it if they know how)

By following this you'll get safety by only affecting the intended target, generally.

3.  Useful modules?

They're all useful, but the first time you run CPAN you'll get all of the essential ones installed for you besides the DBI  one...

Try runing "cpan" and if that fails try the glorious command I couldn't remember for 12 years straight: "perl -MCPAN -e shell"
0
 

Author Comment

by:rajsolaris
ID: 36924862
Sorry for being late was in the patching from last many days....

Hey parparov,

What is that Mirroing CPAN & How does it helps Sir ?

Thanks.
0
 

Author Comment

by:rajsolaris
ID: 36924998
Thanks wesly_chen & Anacreo for your valuable comments.
0
 
LVL 9

Expert Comment

by:parparov
ID: 36925173
Mirroring CPAN means having a local copy of CPAN in your company.
It helps by the fact you install anything much faster, and your mirror is more reliable, and you can also have your own modules together with official CPAN without need to publish them.
0
 

Author Closing Comment

by:rajsolaris
ID: 37033388
Thanks all a lot.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Six Sigma Control Plans
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question