See How to install Memcache on Debian Etch or How to install Memcache on OSX.
root# emerge -pv net-misc/memcached
[ebuild N ] dev-libs/libevent-1.4.4 ...
[ebuild N ] net-misc/memcached-1.2.5 ...
root# emerge -v net-misc/memcached
This will install libevent.
./configure && make
make install
./configure && make
make install
Run "memcached -h" to see a list a options avaible to the memcached. Most likely when you are just starting to test out the deamon, you will do this:
root# memcached -d -u nobody -m 512 127.0.0.1 -p 11211
This will start memcached, using 512MB on the localhost, and listening on the default port 11211.
First, configure the memcached by editing the file /etc/conf.d/memcached. Then do the following:
root# rc-update add memcached default
There isn't memcached in /etc/init.d/ after you installed it. So you have to do it yourself.
DAEMONBOOTSTRAP="$DAEMON -d -u nobody -m 512 127.0.0.1 -p 11211"
# [ -x $DAEMONBOOTSTRAP ] || exit 0
$DAEMONBOOTSTRAP
root# chkconfig --level 35 memcached on
http://www.danga.com/memcached/apis.bml where you can find the client APIs for the clients.
Please reference these docs:
On Gentoo, the package "dev-php5/pecl-memcache" is currently masked off. To get around this, check the post TIP Dealing with masked packages, and then do this:
root# echo "=dev-php5/pecl-memcache-3.0.1" >> /etc/portage/package.keywords
root# emerge -pv dev-php5/pecl-memcache
On Redhat/Cento, first check and make sure pecl is available. Then just run
root# pecl install memcache
In php.ini, add the following line
memcache.hash_strategy="consistent"
Then restart your webserver.
Comments
Anonymous
September 4, 2008
1 year 52 weeks
Thank you for info. Anton,
Thank you for info.
Anton, my blog.
Anonymous
October 18, 2008
1 year 45 weeks
thx
nice tutorial
I install this on my dedicated serwer
and now my forum counter strike works much better :) thx for it!
greeting, mosh
Anonymous
March 20, 2009
1 year 23 weeks
gentoo linux
I tried do do it on my dedicated gentoo linux server, but it doesn't work..
i can't find a "memcache.ini" on my server, where is it?
voyageur
March 20, 2009
1 year 23 weeks
It depends on what app you try to use memcache for
If you are going to use apache and php, then check /etc/php/apache2-php5/ext/, there should be a memcache.ini there.