Caching mechanisms are always useful to improve the speed and performance of the services being provided. Especially when you have dynamic webpages that are required to be loaded up, caching mechanisms, if enabled can be used to load the pages up quickly without bottle-necking the server.
Memcache(d) – | ‘d’ for daemon | is an open source caching method used to speed-up webpages and its parsing.
Steps to install it on a cPanel based server is given below :
# yum install memcached
( ensure the EPEL repo’s are enabled ) : help needed on this ? Check this third-party link
# service memcached start
– start the service.
# pecl install memcache
– Install PHP memcache.
Now, make sure the memcache module is referenced in the php.ini file. If not, add the memcache extension in php.ini file.
# echo "extension=memcache.so" >> /usr/local/lib/php.ini
# service httpd restart
# chkconfig --levels 235 memcached on
: To ensure memcached will be up even after a server reboot:
# php -m | grep memcache
– check if you are good to go !
You can find the configuration file at – vi /etc/sysconfig/memcached
Dont forget to open the port in your Firewall !