首页 > 代码库 > linux 安装memcached

linux 安装memcached

一、安装libevent

sudo wget http://www.monkey.org/~provos/libevent-1.3.tar.gz
sudo tar zxvf libevent-1.3.tar.gz
cd libevent-1.3
sudo ./configure -prefix=/usr
sudo make
sudo make install
查看libevent是否安装成功:
ls -al /usr/lib | grep libevent

二、安装Memcached
sudo wget http://www.memcached.org/files/memcached-1.4.20.tar.gz
sudo tar zxvf memcached-1.4.20.tar.gz
cd memcached-1.4.20
sudo  ./configure --with-libevent=/usr
sudo make
sudo make install

测试是否成功安装memcached:
ls -al /usr/local/bin/mem*

启动memcached
sudo  /usr/local/bin/memcached -d -m 10 -u root -l 192.168.164.129 -p 12000 -c 256 -P /tmp/memcached.pid

 

测试:

telnet  192.168.164.129  12000