Install and Manage Perl Packages on CentOS

This section provides a tutorial example on how to install Perl 5.26 on CentOS 8 systems using 'dnf/yum' as the package manager.

The Perl (Practical Extraction and Report Language) script engine is included as part of the CentOS 8 system by default. You don't need to install it yourself. But you can still install its additional modules using the "dnf" package manager.

1. Login as "herong", who has admin privileges.

2. Check the current installed version of Perl:

herong$ perl -v

This is perl 5, version 26, subversion 3 (v5.26.3) built for
x86_64-linux-thread-multi (with 51 registered patches, ...)
...

3. Run "dnf info perl" to see Perl package information:

herong$ dnf info perl

Available Packages
Name         : perl
Epoch        : 4
Version      : 5.26.3
Release      : 416.el8
Architecture : x86_64
Size         : 72 k
Source       : perl-5.26.3-416.el8.src.rpm
Repository   : AppStream
Summary      : Practical Extraction and Report Language
URL          : http://www.perl.org/
License      : GPL+ or Artistic
Description  : Perl is a high-level programming language with roots in C, sed, awk and shell
             : scripting. Perl is good at handling processes and files, and is especially
             : good at handling text. Perl's hallmarks are practicality and efficiency.
             : While it is used to do a lot of different things, Perl's most common
             : applications are system administration utilities and web programming.
             :
             : This is a metapackage with all the Perl bits and core modules that can be
             : found in the upstream tarball from perl.org.
             :
             : If you need only a specific feature, you can install a specific package
             : instead. E.g. to handle Perl scripts with /usr/bin/perl interpreter,
             : install perl-interpreter package. See perl-interpreter description for more
             : details on the Perl decomposition into packages.

4. Install the "perl" package:

herong$ sudo dnf install perl

...
Installed:
  perl-4:5.26.3-416.el8.x86_64
  perl-Encode-Locale-1.05-9.el8.noarch
  perl-TermReadKey-2.37-7.el8.x86_64
  dwz-0.12-9.el8.x86_64
  efi-srpm-macros-3-2.el8.noarch
  ghc-srpm-macros-1.4.2-7.el8.noarch
  go-srpm-macros-2-16.el8.noarch
  ocaml-srpm-macros-5-4.el8.noarch
  openblas-srpm-macros-2-2.el8.noarch
  perl-Algorithm-Diff-1.1903-9.el8.noarch
  perl-Archive-Tar-2.30-1.el8.noarch
  perl-Archive-Zip-1.60-3.el8.noarch
  perl-Attribute-Handlers-0.99-416.el8.noarch
  perl-B-Debug-1.26-2.el8.noarch
  perl-CPAN-2.18-397.el8.noarch
  perl-CPAN-Meta-2.150010-396.el8.noarch
  perl-CPAN-Meta-Requirements-2.140-396.el8.noarch
  perl-CPAN-Meta-YAML-0.018-397.el8.noarch
  perl-Compress-Bzip2-2.26-6.el8.x86_64
  perl-Compress-Raw-Bzip2-2.081-1.el8.x86_64
  perl-Compress-Raw-Zlib-2.081-1.el8.x86_64
  perl-Config-Perl-V-0.30-1.el8.noarch
  perl-DB_File-1.842-1.el8.x86_64
  perl-Data-OptList-0.110-6.el8.noarch
  perl-Data-Section-0.200007-3.el8.noarch
  perl-Devel-PPPort-3.36-5.el8.x86_64
  perl-Devel-Peek-1.26-416.el8.x86_64
  perl-Devel-SelfStubber-1.06-416.el8.noarch
  perl-Devel-Size-0.81-2.el8.x86_64
  perl-Digest-SHA-1:6.02-1.el8.x86_64
  perl-Encode-devel-4:2.97-3.el8.x86_64
  perl-Env-1.04-395.el8.noarch
  ...

Complete!

5. Verify the installed Perl package:

herong$ perl -v

This is perl 5, version 26, subversion 3 (v5.26.3) built for
x86_64-linux-thread-multi (with 51 registered patches, ...)
...

Ok. The installed Perl package is the same version as the pre-installed Perl in the CentOS system.

Table of Contents

 About This Book

 Introduction to Linux Systems

 Cockpit - Web Portal for Administrator

 Process Management

 Memory Management

 Files and Directories

 Users and Groups

 File Systems

 Block Devices and Partitions

 LVM (Logical Volume Manager)

 Installing CentOS

 SELinux - Security-Enhanced Linux

 Network Connection on CentOS

 Internet Networking Tools

 SSH Protocol and ssh/scp Commands

Software Package Manager on CentOS - DNF and YUM

 What Is DNF

 Manage DNF Package Repositories

 What Is YUM

 What Is RPM

 What Is pkgs.org

 Install and Manage Java Packages on CentOS

Install and Manage Perl Packages on CentOS

 Install "git-core" for GitHub Packages on CentOS

 Failed to Download Metadata for Repo ...

 Replacing CentOS Repositories to Local Mirrors

 vsftpd - Very Secure FTP Daemon

 LDAP (Lightweight Directory Access Protocol)

 Administrative Tasks

 References

 Full Version in PDF/EPUB