How To Install withlock on CentOS 7
Introduction
In this tutorial we learn how to install withlock
on CentOS 7.
What is withlock
withlock is a locking wrapper script to make sure that some program isn’t run more than once. It is ideal to prevent periodic jobs spawned by cron from stacking up. The locks created are valid only while the wrapper is running, and thus will never require additional cleanup, even after a reboot. This makes the wrapper safe and easy to use, and much better than implementing half-hearted locking within scripts.
We can use yum
or dnf
to install withlock
on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install withlock.
Install withlock on CentOS 7 Using yum
Update yum database with yum
using the following command.
After updating yum database, We can install withlock
using yum
by running the following command:
Install withlock 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.
After updating yum database, We can install withlock
using dnf
by running the following command:
How To Uninstall withlock on CentOS 7
To uninstall only the withlock
package we can use the following command:
References
Summary
In this tutorial we learn how to install withlock
on CentOS 7 using yum
and dnf
.