How To Install php-phpass on CentOS 7

In this tutorial we learn how to install php-phpass on CentOS 7. php-phpass is Portable password hashing framework for use in PHP applications

Introduction

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

What is php-phpass

phpass (pronounced “pH pass”) is a portable public domain password hashing framework for use in PHP applications. It is meant to work with PHP 3 and above. The preferred (most secure) hashing method supported by phpass is the OpenBSD-style Blowfish-based bcrypt and known in PHP as CRYPT_BLOWFISH, with a fallback to BSDI-style extended DES-based hashes, known in PHP as CRYPT_EXT_DES, and a last resort fallback to MD5-based salted and variable iteration count password hashes implemented in phpass itself (also referred to as portable hashes).

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

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

sudo yum -y install php-phpass

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

sudo dnf -y install php-phpass

How To Uninstall php-phpass on CentOS 7

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

sudo dnf remove php-phpass

References

Summary

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