1.打开memcached官网
https://memcached.org/
右击复制下载地址
cd /usr/local/srcwget http://www.memcached.org/files/memcached-1.6.1.tar.gz
解压拆包gunzip memcached-1.6.1.tar.gztar xf memcached-1.6.1.tar
编译安装cd memcached-1.6.1/./configure --prefix=/usr/local/memcached
报如下错误 memcached需要libevent
打开libevent官网
https://www.monkey.org/~provos/libevent/
复制链接地址下载到/usr/local/src目录cd /usr/local/src
wget wget https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz
解压—拆包gunzip libevent-2.1.11-stable.tar.gztar xf libevent-2.1.11-stable.tar
编译安装./configure --prefix=/usr/local/libeventmake && make install
安装libvent后,继续安装memcachedcd /usr/local/src/memcached-1.6.1/
./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent
make && make install
安装完成,启动memcachedcd /usr/local/memcached./memcached
报错。。。without the -u switch
意思是不能使用root账号启动
改成./memcached -u nobody -vvv
启动成功