Tuesday, June 25, 2013

Install - Memcached

1. libevent

wget http://www.monkey.org/~provos/libevent-1.3a.tar.gz

tar xvfz libevent-1.3a.tar.gz
cd libevent-1.3a
./configure --prefix=/usr/local/libevent1.4.4
make
make install



2. memcached

wget http://www.danga.com/memcached/dist/memcached-1.2.1.tar.gz

tar xvfz memcached-1.2.1.tar.gz

cd memcached-1.2.1

./configure --prefix=/usr/local/memcached-1.2.5 --with-libevent=/usr/local/libevent
make
make install

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/libevent/lib
echo "/usr/local/lib" >>/etc/ld.so.conf
echo "/usr/local/libevent/lib" >>/etc/ld.so.conf
/sbin/ldconfig

memcached -d -m 1024 -l 127.0.0.1 -p 11211 -u root


# to replication
./configure --enable-replication --prefix=/usr/local/memcached-1.2.8 --with-libevent=/usr/local/libevent

No comments:

Post a Comment