How To Install php-pecl-mongodb on Fedora 36

In this tutorial we learn how to install php-pecl-mongodb in Fedora 36. php-pecl-mongodb is MongoDB driver for PHP

Introduction

In this tutorial we learn how to install php-pecl-mongodb on Fedora 36.

What is php-pecl-mongodb

The purpose of this driver is to provide exceptionally thin glue between MongoDB and PHP, implementing only fundemental and performance-critical components necessary to build a fully-functional MongoDB driver.

We can use yum or dnf to install php-pecl-mongodb on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install php-pecl-mongodb.

Install php-pecl-mongodb on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install php-pecl-mongodb using dnf by running the following command:

sudo dnf -y install php-pecl-mongodb

Install php-pecl-mongodb on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install php-pecl-mongodb using yum by running the following command:

sudo yum -y install php-pecl-mongodb

How To Uninstall php-pecl-mongodb on Fedora 36

To uninstall only the php-pecl-mongodb package we can use the following command:

sudo dnf remove php-pecl-mongodb

php-pecl-mongodb Package Contents on Fedora 36

/etc/php-zts.d/50-mongodb.ini
/etc/php.d/50-mongodb.ini
/usr/lib/.build-id
/usr/lib/.build-id/62
/usr/lib/.build-id/62/73d24a30fb02d55cdb9194bb4f86a90b254273
/usr/lib/.build-id/b9
/usr/lib/.build-id/b9/b17f97be95544f2ba2024837954a2257fd868a
/usr/lib64/php-zts/modules/mongodb.so
/usr/lib64/php/modules/mongodb.so
/usr/share/doc/pecl/mongodb
/usr/share/doc/pecl/mongodb/CONTRIBUTING.md
/usr/share/doc/pecl/mongodb/CREDITS
/usr/share/doc/pecl/mongodb/README.md
/usr/share/doc/pecl/mongodb/THIRD_PARTY_NOTICES
/usr/share/licenses/php-pecl-mongodb
/usr/share/licenses/php-pecl-mongodb/LICENSE
/var/lib/php/peclxml/php-pecl-mongodb.xml

References

Summary

In this tutorial we learn how to install php-pecl-mongodb on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).