How To Install php-guzzlehttp-guzzle on CentOS 7

In this tutorial we learn how to install php-guzzlehttp-guzzle on CentOS 7. php-guzzlehttp-guzzle is PHP HTTP client and webservice framework

Introduction

In this tutorial we learn how to install php-guzzlehttp-guzzle on CentOS 7.

What is php-guzzlehttp-guzzle

Guzzle is a PHP HTTP client that makes it easy to work with HTTP/1.1 and takes the pain out of consuming web services. * Pluggable HTTP adapters that can send requests serially or in parallel * Doesn’t require cURL, but uses cURL by default * Streams data for both uploads and downloads * Provides event hooks & plugins for cookies, caching, logging, OAuth, mocks, etc * Keep-Alive & connection pooling * SSL Verification * Automatic decompression of response bodies * Streaming multipart file uploads * Connection timeouts Autoloader

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

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

sudo yum -y install php-guzzlehttp-guzzle

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

sudo dnf -y install php-guzzlehttp-guzzle

How To Uninstall php-guzzlehttp-guzzle on CentOS 7

To uninstall only the php-guzzlehttp-guzzle package we can use the following command:

sudo dnf remove php-guzzlehttp-guzzle

References

Summary

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