How To Install apache-commons-logging on CentOS 8

apache-commons-logging is Apache Commons Logging

Introduction

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

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 8. 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 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo dnf -y install apache-commons-logging

Install apache-commons-logging on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo yum -y install apache-commons-logging

How To Uninstall apache-commons-logging on CentOS 8

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

sudo dnf remove apache-commons-logging

apache-commons-logging Package Contents on CentOS 8

/usr/share/doc/apache-commons-logging
/usr/share/doc/apache-commons-logging/PROPOSAL.html
/usr/share/doc/apache-commons-logging/RELEASE-NOTES.txt
/usr/share/java/apache-commons-logging-adapters.jar
/usr/share/java/apache-commons-logging-api.jar
/usr/share/java/apache-commons-logging.jar
/usr/share/java/commons-logging-adapters.jar
/usr/share/java/commons-logging-api.jar
/usr/share/java/commons-logging.jar
/usr/share/licenses/apache-commons-logging
/usr/share/licenses/apache-commons-logging/LICENSE.txt
/usr/share/licenses/apache-commons-logging/NOTICE.txt
/usr/share/maven-metadata/apache-commons-logging.xml
/usr/share/maven-poms/apache-commons-logging-api.pom
/usr/share/maven-poms/apache-commons-logging.pom
/usr/share/maven-poms/commons-logging-api.pom
/usr/share/maven-poms/commons-logging.pom

References

Summary

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