Active7 years, 3 months ago
I constantly have to set up new servers for an employer of mine for an exact purpose of his, and as such they all have to be set up in exactly the same way. So I've created a script in PHP that I run from my own box to automatically send over all the relevant files, compile everything, run updates, and everything else.
If you are looking to prevent from Heartbleed and enable Perfect Forward Secrecy please check this link Heartbleed Fix After Heartbleed alert. Close Call Now!!
However, for some reason these brand new servers come with perl, which is fine, but they have perl installed in different locations. This makes it a pain for me to copy over
Config.pm
for CPAN without going in and finding the location manually.Is there perhaps some command I'm unaware of that will hunt down the precise location?
If it helps, usually the servers are CentOS 5
RobRob89388 gold badges2222 silver badges4848 bronze badges
4 Answers
Use the
which
command to get the path of perl:Use the
에이바에이바find
command in linux to look for CPAN:29744 gold badges99 silver badges3131 bronze badges
I constantly have to set up new servers for an employer of mine for an exact purpose of his, and as such they all have to be set up in exactly the same way. So I've created a script in PHP that I run from my own box to automatically send over all the relevant files, compile everything, run updates, and everything else.
You're doing it wrong and making more work for yourself.
Investigate configuration management tools (Puppet, Chef) or deployment tools (radmind) -- If you deploy your systems with something like the tools I just mentioned you will know that every box is truly identical, and more importantly that they'll be kept that way.
Investigate configuration management tools (Puppet, Chef) or deployment tools (radmind) -- If you deploy your systems with something like the tools I just mentioned you will know that every box is truly identical, and more importantly that they'll be kept that way.
![How To Check Installed Perl Modules Linux How To Check Installed Perl Modules Linux](/uploads/1/2/6/0/126071696/818724783.jpg)
Until you have the time to do that,
voretaq7voretaq7locate
or find
as others have mentioned will at least tell you where the file you want lives.75.2k1414 gold badges118118 silver badges202202 bronze badges
will find the location of Perl in the path.
If
mlocate.db
is up to date, you can useAnother way to find likely locations for
Dennis WilliamsonDennis WilliamsonCPAN.pm
:How To Check Installed Perl Modules In Linux
52.2k1212 gold badges9494 silver badges136136 bronze badges
How To Check Installed Certificates
Faster than Ava Gailliot's suggestion and with fewer false positives:
The path here is all the directories of your perl installation where perl is allowed to look for modules to load.
mobmob