How To Install python-iptools on CentOS 7

In this tutorial we learn how to install python-iptools on CentOS 7. python-iptools is A few useful functions and objects for manipulating IP addresses

Introduction

In this tutorial we learn how to install python-iptools on CentOS 7.

What is python-iptools

A few useful functions and objects for manipulating IPv4 and IPv6 addresses in python. The project was inspired by a desire to be able to use CIDR address notation to designate INTERNAL_IPS in a Django project’s settings file.

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

Install python-iptools on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install python-iptools using yum by running the following command:

sudo yum -y install python-iptools

Install python-iptools 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 python-iptools using dnf by running the following command:

sudo dnf -y install python-iptools

How To Uninstall python-iptools on CentOS 7

To uninstall only the python-iptools package we can use the following command:

sudo dnf remove python-iptools

References

Summary

In this tutorial we learn how to install python-iptools on CentOS 7 using yum and dnf.