How To Install apache-commons-logging on CentOS 7

In this tutorial we learn how to install apache-commons-logging on CentOS 7. apache-commons-logging is Apache Commons Logging

Introduction

In this tutorial we learn how to install apache-commons-logging on CentOS 7.

What is apache-commons-logging

The commons-logging package provides a simple, component oriented interface (org.apache.commons.logging.Log) together with wrappers for logging systems. The user can choose at runtime which system they want to use. In addition, a small number of basic implementations are provided to allow users to use the package standalone. commons-logging was heavily influenced by Avalon’s Logkit and Log4J. The commons-logging abstraction is meant to minimize the differences between the two, and to allow a developer to not tie himself to a particular logging implementation.

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

Install apache-commons-logging on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install apache-commons-logging using yum by running the following command:

sudo yum -y install apache-commons-logging

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

sudo dnf -y install apache-commons-logging

How To Uninstall apache-commons-logging on CentOS 7

To uninstall only the apache-commons-logging package we can use the following command:

sudo dnf remove apache-commons-logging

References

Summary

In this tutorial we learn how to install apache-commons-logging on CentOS 7 using yum and dnf.