Installing memcached on Centos

From vpsget wiki
Jump to: navigation, search

Install memcached.

yum install memcached

Open config file /etc/sysconfig/memcached and make sure you have only your machine allowed to connect to port 11211. File must look like below:

PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS="-l 127.0.0.1"

Add to php.ini:

extension = "memcache.so"

Start memcached:

service memcached start

Restart Apache

service httpd restart