Product SiteDocumentation Site

4. Memcached

Memcached module
Install Memcached package
yum install memcached
Configure memcached, edit /etc/sysconfig/memcached
Most important value to configure is CACHESIZE, which is cache size on Megabytes.
PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="512"
OPTIONS=""
Set Memcached to start automatically on boot:
systemctl enable memcached.service

Note

memcached.service is not a native service, redirecting to /sbin/chkconfig. Executing /sbin/chkconfig memcached on
Start Memcached
systemctl start memcached.service
Check that Memcached is Running and Working
echo stats | nc localhost 11211
Install Memcache and Memcached PHP Module
yum install php-pecl-memcache php-pecl-memcached
Restart php-fpm
systemctl restart php-fpm.service
Restart nginx
systemctl restart nginx.service