Linux security

How to install PERL modules with yum or CPAN on Linux

Many Perlmodules are available via repositories on Red Hat Linux server or CentOS Linux servers, the name the modules have in the repository differ from the name of the module itself.

There are few ways how you can install Perl modules on Linux machines, to use yum to install a Perl module using the module name, just place ‘”perl()”‘ around the name of the module (double quotes included) when giving it as an argument to yum.

For example, to install the ‘Net::Telnet’ module, you would run ‘yum install:

su
yum install “perl(Net::Telnet)" -y

Other option to install Perl modules is to use CPAN

su
perl -MCPAN -e shell
cpan> install Net::Telnet

As you can see two different ways to install Perl modules – same result 🙂

Leave a Reply