Linux – 安装 Memcached 缓存系统
     发布在:System      浏览:34      评论:0 条评论

官网:http://www.memcached.org/downloads

GitHub:https://github.com/memcached/memcached

准备

请先安装 Linux 常用依赖包:《Linux 常用 Yum 依赖包》

Yum 安装(推荐)

# 安装
> yum -y install memcached
# 启动
> memcached -m 64 -p 11211 -u www -d

编译安装

安装 Libevent

下载

> cd /opt
> wget https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz

解压

> tar -zxvf libevent-2.1.8-stable.tar.gz

编译安装

> cd libevent-2.1.8-stable
> ./configure --prefix=/usr/local/libevent && make && make install

安装 Memcached

下载

> cd /opt
> wget http://www.memcached.org/files/memcached-1.5.12.tar.gz

解压

> tar -zxvf memcached-1.5.12.tar.gz

编译安装

> cd memcached-1.5.12
> ./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent/
> make && make install

启动

> cd /usr/local/memcached/
> ./bin/memcached -m 64 -p 11211 -u www -d
Responses