How To Install libdaemon on CentOS 7

In this tutorial we learn how to install libdaemon on CentOS 7. libdaemon is Library for writing UNIX daemons

Introduction

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

What is libdaemon

libdaemon is a lightweight C library which eases the writing of UNIX daemons. It consists of the following parts * A wrapper around fork() which does the correct daemonization procedure of a process * A wrapper around syslog() for simpler and compatible log output to Syslog or STDERR * An API for writing PID files * An API for serializing UNIX signals into a pipe for usage with select() or poll() * An API for running subprocesses with STDOUT and STDERR redirected to syslog. libdaemon is a lightweight C library which eases the writing of UNIX daemons. It consists of the following parts * A wrapper around fork() which does the correct daemonization procedure of a process * A wrapper around syslog() for simpler and compatible log output to Syslog or STDERR * An API for writing PID files * An API for serializing UNIX signals into a pipe for usage with select() or poll() * An API for running subprocesses with STDOUT and STDERR redirected to syslog.

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

Install libdaemon on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install libdaemon

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

sudo dnf -y install libdaemon

How To Uninstall libdaemon on CentOS 7

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

sudo dnf remove libdaemon

References

Summary

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