How To Install php-doctrine-dbal on CentOS 7

In this tutorial we learn how to install php-doctrine-dbal on CentOS 7. php-doctrine-dbal is Doctrine Database Abstraction Layer (DBAL)

Introduction

In this tutorial we learn how to install php-doctrine-dbal on CentOS 7.

What is php-doctrine-dbal

The Doctrine database abstraction & access layer (DBAL) offers a lightweight and thin runtime layer around a PDO-like API and a lot of additional, horizontal features like database schema introspection and manipulation through an OO API. The fact that the Doctrine DBAL abstracts the concrete PDO API away through the use of interfaces that closely resemble the existing PDO API makes it possible to implement custom drivers that may use existing native or self-made APIs. For example, the DBAL ships with a driver for Oracle databases that uses the oci8 extension under the hood. Autoloader

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

Install php-doctrine-dbal 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-doctrine-dbal using yum by running the following command:

sudo yum -y install php-doctrine-dbal

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

sudo dnf -y install php-doctrine-dbal

How To Uninstall php-doctrine-dbal on CentOS 7

To uninstall only the php-doctrine-dbal package we can use the following command:

sudo dnf remove php-doctrine-dbal

References

Summary

In this tutorial we learn how to install php-doctrine-dbal on CentOS 7 using yum and dnf.