Install memcached service and memcache php extension on easyapache 4 cpanel

as you little bit confuse when memcache php module is not available on default easyApache 4, so, here is the way to have it.

firstly, you have to install memcache server fitst. just simple copy paste this command :

#yum install -y memcached

then run in

#service memcached start

then make sure it automatically start on system startup

#chkconfig memcached on

yeahh.. that’s it.. so, you have memcached service running on your machine.

to use it, yo have to install PHP memcache modul on your PHP installation.

since cpanel using EasyApache4 — which is using multiple PHP versions — memcache installation is not available on default EasyApache4. then it little bit stressing if you would to install it from sourcecode compiling because you have to install it onto all PHP version. and yet, there are some issue if you want to do it. like php-devel that is not in “used to” location, etc..

so, just copy paste this command, then it will save your days

#yum install ea4-experimental
#yum install ea-php56-php-memcache
#yum install ea-php56-php-memcached

if you want it on another php version, keep on going copy paste

#yum install ea-php54-php-memcache
#yum install ea-php54-php-memcached

#yum install ea-php55-php-memcache
#yum install ea-php55-php-memcached

#yum install ea-php70-php-memcache
#yum install ea-php70-php-memcached

and of course for you php 7.1

#yum install ea-php71-php-memcache
#yum install ea-php71-php-memcached

check it by using php info or simply type this command to check it out

#php -i | grep -i memcache

feel free to drop your comment