1)、软件包安装


1、下载memcached-1.4.15.tar.gz


2、切换创建usr/java目录解压tar包
mkdir /usr/local/memcached
cd /usr/local/memcached
tar zxvf /software/memcached-1.4.15.tar.gz  -C ./memcached/


3、进入目录
cd /usr/local/memcached/


4、配置
./configure --prefix=/usr/local/memcached/memcached-1.4.15


5、编译
make && make test


6、安装
sudo make install  


7、Memcached 运行命令帮助
/usr/local/memcached/bin/memcached -h


8、前台程序运行
/usr/local/memcached/bin/memcached -p 11211 -m 64m -vv -u root
/usr/local/memcached/bin/memcached -p 11211 -m 64m -d -u root
/usr/local/memcached/bin/memcached -d -m 64M -u root -l 192.168.0.200 -p 11211 -c 256 -P /tmp/memcached.pid


9、测试连接
telnet 127.0.0.1 11211
set foo 0 0 3
bar
get foo
quit 




------------------------------------可能出现的问题------------------------------------


1、libevent包不存在需下载
checking for libevent directory... configure: error: libevent is required.  You can get it from http://www.monkey.org/~provos/libevent/
rpm -qa|grep libevent
yum -y install libevent
yum install libevent-devel


2、telnet包不存在需下载
yum install telnet
Logo

更多推荐