- These instructions are intended specifically for installing the Memcached PHP Extension on a single CentOS 7 node.
- I’ll be working from a Liquid Web Core Managed CentOS 7 server, and I’ll be logged in as root.
- Follow our tutorial on How to Install Memcached on CentOS 7 prior to this KB!
Step #1: Install Memcached PHP ExtensionFirst, clean-up yum:
yum clean allAs a matter of best practice we’ll update our packages:
yum -y updateThen installing PHP Memcached extension and related packages is now as simple as running just one command::
yum -y install php-pecl-memcache
Step #2: Verify InstallationRestart memcached and httpd:
systemctl restart memcached systemctl restart httpdUse the following command to view information on the installed PHP modules:
php -m | grep memcacheAnd look for a response similar to: memcache You can also verify the configuration of PHP with phpinfo. Follow our tutorial: How To: Check PHP Modules With phpinfo