How To Install ElectricFence on CentOS 7

In this tutorial we learn how to install ElectricFence on CentOS 7. ElectricFence is A debugger which detects memory allocation violations

Introduction

In this tutorial we learn how to install ElectricFence on CentOS 7.

What is ElectricFence

ElectricFence is a utility for C programming and debugging. ElectricFence uses the virtual memory hardware of your system to detect when software overruns malloc() buffer boundaries, and/or to detect any accesses of memory released by free(). ElectricFence will then stop the program on the first instruction that caused a bounds violation and you can use your favorite debugger to display the offending statement. Install ElectricFence if you need a debugger to find malloc() violations. ElectricFence is a utility for C programming and debugging. ElectricFence uses the virtual memory hardware of your system to detect when software overruns malloc() buffer boundaries, and/or to detect any accesses of memory released by free(). ElectricFence will then stop the program on the first instruction that caused a bounds violation and you can use your favorite debugger to display the offending statement. Install ElectricFence if you need a debugger to find malloc() violations.

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

Install ElectricFence on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install ElectricFence

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

sudo dnf -y install ElectricFence

How To Uninstall ElectricFence on CentOS 7

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

sudo dnf remove ElectricFence

References

Summary

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