一、下載magent

下載地址:http://pan.baidu.com/s/1eRygtEU
mkdir -p /usr/local/magent
cd magent
tar -xvf magent-0.5.tar.gz
二、安裝magent
cd magent
/sbin/ldconfig
sed -i "s#LIBS = -levent#LIBS = -levent -lm#g"Makefile
make
可能會失敗:

需要修改vim ketama.h
添加:
#ifndef SSIZE_MAX
#define SSIZE_MAX 32676
#endif
再次make

就是安裝成功。
附兩個腳本:啟動memcached(兩個實例)、啟動magent
下載地址:http://pan.baidu.com/s/1IXcho
