How To Install php-Monolog on CentOS 7
Introduction
In this tutorial we learn how to install php-Monolog
on CentOS 7.
What is php-Monolog
Monolog sends your logs to files, sockets, inboxes, databases and various web services. Special handlers allow you to build advanced logging strategies. This library implements the PSR-3 [1] interface that you can type-hint against in your own libraries to keep a maximum of interoperability. You can also use it in your applications to make sure you can always use another compatible logger at a later time. [1] http
We can use yum
or dnf
to install php-Monolog
on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install php-Monolog.
Install php-Monolog on CentOS 7 Using yum
Update yum database with yum
using the following command.
sudo yum makecache
After updating yum database, We can install php-Monolog
using yum
by running the following command:
sudo yum -y install php-Monolog
Install php-Monolog 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 php-Monolog
using dnf
by running the following command:
sudo dnf -y install php-Monolog
How To Uninstall php-Monolog on CentOS 7
To uninstall only the php-Monolog
package we can use the following command:
sudo dnf remove php-Monolog
References
Summary
In this tutorial we learn how to install php-Monolog
on CentOS 7 using yum
and dnf
.