How To Install GeoIP on Rocky Linux 8

In this tutorial we learn how to install GeoIP on Rocky Linux 8. GeoIP is Library for country/city/organization to IP address or hostname mapping

Introduction

In this tutorial we learn how to install GeoIP on Rocky Linux 8.

What is GeoIP

GeoIP is a C library that enables the user to find the country that any IP address or hostname originates from. It uses file based databases that can optionally be updated on a weekly basis by installing the geoipupdate-cron (IPv4) and/or geoipupdate-cron6 (IPv6) packages.

We can use yum or dnf to install GeoIP on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install GeoIP.

Install GeoIP on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install GeoIP using dnf by running the following command:

sudo dnf -y install GeoIP

Install GeoIP on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install GeoIP using yum by running the following command:

sudo yum -y install GeoIP

How To Uninstall GeoIP on Rocky Linux 8

To uninstall only the GeoIP package we can use the following command:

sudo dnf remove GeoIP

GeoIP Package Contents on Rocky Linux 8

/usr/bin/geoiplookup
/usr/bin/geoiplookup6
/usr/lib/.build-id
/usr/lib/.build-id/0b
/usr/lib/.build-id/0b/6ae01401fadaccf2389a3ddb2fe9310d7f6f50
/usr/lib/.build-id/83
/usr/lib/.build-id/83/2f645cfa96f0edb61f2fe656c3d71507ecae22
/usr/lib/.build-id/b8
/usr/lib/.build-id/b8/fa7a265577f72e7d26522d8d21421b45dc9453
/usr/lib64/libGeoIP.so.1
/usr/lib64/libGeoIP.so.1.6.12
/usr/share/doc/GeoIP
/usr/share/doc/GeoIP/AUTHORS
/usr/share/doc/GeoIP/ChangeLog
/usr/share/doc/GeoIP/NEWS.md
/usr/share/doc/GeoIP/README.md
/usr/share/licenses/GeoIP
/usr/share/licenses/GeoIP/COPYING
/usr/share/man/man1/geoiplookup.1.gz
/usr/share/man/man1/geoiplookup6.1.gz

References

Summary

In this tutorial we learn how to install GeoIP on Rocky Linux 8 using yum and dnf.