Real life problems solved

Advert

Install Memcached on Fedora 14 in the Rackspace Cloud

This will install the latest stable version of Memcached on Fedora 14 in the Rackspace Cloud.

yum install memcached
nano -w /etc/sysconfig/memcached
PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="200"
OPTIONS=""

Here change Cachesize to whatever size you want to use in Mb

chkconfig memcached on
/etc/init.d/memcached start

Check it’s working

memcached-tool 127.0.0.1:11211
memcached-tool 127.0.0.1:11211 stats

Open the Firewall

/sbin/iptables -I INPUT 1 -p tcp --dport 11211 -j ACCEPT
/sbin/service iptables save
service iptables restart

Install PHP module

Do this on all servers you want to talk to the Memcached server

yum install php-pecl-memcached
service httpd restart

Useful Links

  • RogĂ©rio Madureira

    Nice and sweet. Thanks.

  • Guest

    “Here change Cachesize to whatever size you want to use in Mb”

    Just to be clear, the cache size is specified in MB, not Mb

  • MicronXD

    Because of Memcached’s lack of authentication, I’d specify at least the IP’s you expect to be hitting your memcache daemon. To play it extra-safe, I’d just lock it down completely to the loopback interface with “-i lo”:
    /sbin/iptables -I INPUT 1 -p tcp -i lo –dport 11211 -j ACCEPT

Adsense