Installing Memcached PHP Extension for CentOS and Fedora
Installing the PHP Extension for Memcached is a simple process, this tutorial will show installation for CentOS and Fedora operating systems. The installation is done through the command line using yum.
Warning: |
You must install Memcached on your server before installing the extension. See our article Installing memecached on CentOS 7 and Fedora. |
Installing the PHP Extension for Memcached is a simple process, this tutorial will show installation for CentOS and Fedora operating systems. The installation is done through the command line using yum.
- First, clean up yum:
yum clean all
- Then make sure your packages are all up to date:
yum -y update
- Now you are ready to install the PHP Memcached extension and related packages:
yum - y install php-pecl-memcache
- To verify the installation of memcached, you’ll want to restart memcached and httpd:
systemctl restart memcached
systemctl restart httpd - You can view information on the installed PHP modules with the following command:
php - m | grep memcache
- Look for a response similar to:
memcache