第一步:下载libevent
[[email protected] src]# wget http://soft.51yuki.cn/libevent-2.0.21-stable.tar.gz
第二步:安装libevent
[[email protected] src]# tar xf libevent-2.0.21-stable.tar.gz
[[email protected] src]# cd libevent-2.0.21-stable
[[email protected] libevent-2.0.21-stable]# ./configure --prefix=/usr/local/libevent-2.0.21 && make && make install
由于安装libevent库没有安装在标准的linux目录库下,需要在ld.so.conf文件下添加如下内容
[[email protected] ~]# vim /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/libevent-2.0.21/lib/
[[email protected] ~]# ldconfig
第三步:下载并安装memcached服务
[[email protected] src]# wget http://soft.51yuki.cn/memcached-1.4.35.tar.gz
[[email protected] src]# tar xf memcached-1.4.35.tar.gz
[[email protected] ~]# cd /usr/local/src/memcached-1.4.35
[[email protected] memcached-1.4.35]# ./configure --prefix=/usr/local/memcached-1.4.35 --with-libevent=/usr/local/libevent-2.0.21/ && make && make install
第四步:查看安装后的目录结构
[[email protected] memcached-1.4.35]# tree /usr/local/memcached-1.4.35/
/usr/local/memcached-1.4.35/
├── bin
│ └── memcached
├── include
│ └── memcached
│ └── protocol_binary.h
└── share
└── man
└── man1
└── memcached.1