Re: Ensuring cpan modules installed on all computers in a network are consistent
by BrowserUk (Patriarch) on Jan 20, 2013 at 01:56 UTC
|
Once the scripts are written we place them in a folder that is accessible to all users in our network ...
Why not also share the installed Perl in the same way, then you only need to maintain a single copy of both perl and its installed modules.
And if you make the shared folder readonly to your users, they cannot modify anything.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
Re: Ensuring cpan modules installed on all computers in a network are consistent
by tobyink (Canon) on Jan 19, 2013 at 22:43 UTC
|
About a month ago there was a PerlAdvent.org article which presents a good solution for this sort of problem.
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
| [reply] |
|
| [reply] |
Re: Ensuring cpan modules installed on all computers in a network are consistent
by blue_cowdawg (Monsignor) on Jan 20, 2013 at 01:12 UTC
|
ensure that the perl modules installed for all other users on all computers are consistent.
First off, you need one person or one committee to decide on what is "standard" for your enterprise.
Second, there are at least two ways to do this that come to mind immediately.
First method would be to set up NFS/AFS/whatever mounts with Perl and its modules all set up. In doing this you could mount it someplace such as /MyCompany/Perl or whatever and provide symbolic links for /usr/bin/perl and friends. This is a "yucky" way of doing it but very similar to what I was doing at a major financial firm back around 2001. AFS was used and we actually had to support multiple versions of Perl on multiple platforms and for multiple OS versions (Solaris vs. SunOS for instance).
The other method that leaps to mind is to build out what you want for Perl from source, add the modules you want and then package this all up and install it everywhere. This is actually my preferred method and in the current environment that I work in we have a standard mount point for all locally produced packages.
You can decide if you want to do symbolic linking or just put #!/my/mount/path/perl/bin/perl in all your scripts.
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
| [reply] [d/l] |
Re: Ensuring cpan modules installed on all computers in a network are consistent
by 7stud (Deacon) on Jan 20, 2013 at 01:45 UTC
|
I've never used it before, but the cpan command has an autobundle flag, that will bundle up all the installed modules. Then I think you should be able copy that file for all the users, and then install it. See here:
link and here link
Also, I don't know if you've heard of perlbrew or not, but if your users install perlbrew, they will be able to install any modules they want locally--thwarting your efforts to restrict all users to the modules you've chosen.
| [reply] |
Re: Ensuring cpan modules installed on all computers in a network are consistent
by mhearse (Chaplain) on Jan 20, 2013 at 17:49 UTC
|
The way I've done it is using software package management. This includes Redhat based (rpms), Debian (dpkg) or BSD (pkgng or ports). Creating packages is a bit of a pain. But a definitive way to ensure uniform machines. | [reply] |
|
Would this be a case of running a root script which secure shells to each computer on the network and yum install or apt-get install the required library. I assume this would save the downloaded package in /usr/lib and the perl module would then be available for all users on that computer?
| [reply] |
|
for i in $(cat serverlist)
do
ssh "$i" "sudo yum -y install your.rpm"
done
| [reply] [d/l] |
|
|
Re: Ensuring cpan modules installed on all computers in a network are consistent
by bcarroll (Pilgrim) on Jan 21, 2013 at 05:37 UTC
|
| [reply] |