How To Install perl-File-NFSLock on CentOS 7

In this tutorial we learn how to install perl-File-NFSLock on CentOS 7. perl-File-NFSLock is Perl module to do NFS (or not) locking

Introduction

In this tutorial we learn how to install perl-File-NFSLock on CentOS 7.

What is perl-File-NFSLock

Program based of concept of hard linking of files being atomic across NFS. This concept was mentioned in Mail was originally presented in Mail flow is taken from there – particularly the idea of creating a random local file, hard linking a common file to the local file, and then checking the nlink status. Some ideologies were not complete (uncache mechanism, shared locking) and some coding was even incorrect (wrong stat index). File light, generic, and fast.

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

Install perl-File-NFSLock 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-File-NFSLock using yum by running the following command:

sudo yum -y install perl-File-NFSLock

Install perl-File-NFSLock 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-File-NFSLock using dnf by running the following command:

sudo dnf -y install perl-File-NFSLock

How To Uninstall perl-File-NFSLock on CentOS 7

To uninstall only the perl-File-NFSLock package we can use the following command:

sudo dnf remove perl-File-NFSLock

References

Summary

In this tutorial we learn how to install perl-File-NFSLock on CentOS 7 using yum and dnf.