How To Install perl-Net-IP-Match-Regexp on CentOS 7

In this tutorial we learn how to install perl-Net-IP-Match-Regexp on CentOS 7. perl-Net-IP-Match-Regexp is Efficiently match IP addresses against ranges

Introduction

In this tutorial we learn how to install perl-Net-IP-Match-Regexp on CentOS 7.

What is perl-Net-IP-Match-Regexp

This module allows you to check an IP address against one or more IP ranges. It employs Perl’s highly optimized regular expression engine to do the hard work, so it is very fast. It is optimized for speed by doing the match against a regexp which implicitly checks the broadest IP ranges first. An advantage is that the regexp can be computed and stored in advance (in source code, in a database table, etc) and reused, saving much time if the IP ranges don’t change too often. The match can optionally report a value (e.g. a network name) instead of just a boolean, which makes module useful for mapping IP ranges to names or codes or anything else.

We can use yum or dnf to install perl-Net-IP-Match-Regexp on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install perl-Net-IP-Match-Regexp.

Install perl-Net-IP-Match-Regexp on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install perl-Net-IP-Match-Regexp using yum by running the following command:

sudo yum -y install perl-Net-IP-Match-Regexp

Install perl-Net-IP-Match-Regexp on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install perl-Net-IP-Match-Regexp using dnf by running the following command:

sudo dnf -y install perl-Net-IP-Match-Regexp

How To Uninstall perl-Net-IP-Match-Regexp on CentOS 7

To uninstall only the perl-Net-IP-Match-Regexp package we can use the following command:

sudo dnf remove perl-Net-IP-Match-Regexp

References

Summary

In this tutorial we learn how to install perl-Net-IP-Match-Regexp on CentOS 7 using yum and dnf.