在Linux下安装Memcached,先要安装libevent,在http://www.monkey.org/~provos/libevent/下载
Memcache在http://www.danga.com/memcached/download.bml下载
可能是我将libevent安装在/usr/local/libevent目录的缘故,在启动memchached时报一个错误
./memcached: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
我们先运行下面的命令,将libevent的lib目录加入LD_LIBRARY_PATH里
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/libevent/lib
之后再启动memcached就好了。