CentOS 5.6下Memcached的安装和配置
关键词:安装Memcached,Memcached配置,Memcached,CentOS Memcached
解析:Memcached是什么?
Memcached是由Danga Interactive开发的,高性能的,分布式的内存对象缓存系统,用于在动态应用中减少数据库负载,提升访问速度。
一、文件版本
1、libevent 最新的稳定版: wget http://monkey.org/~provos/libevent-1.4.14b-stable.tar.gz
引用网页:http://www.monkey.org/~provos/libevent/
2、memcached 最新的稳定版:wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
引用网页: http://code.google.com/p/memcached/downloads/list
二、安装过程
1、操作系统 CentOS 5.6
原文件包: libevent-1.4.14-1 ; memcached-1.4.5
2、安装Libevent
# rpm -q libevent (首先检查系统是否安装了Libevent)
# yum -y install libevent* (我使用的Yum安装)或者可以使用编译安装
# tar zxvf libevent-1.4.14b-stable.tar.gz
# cd libevent-1.4.14b-stable
# ./configure --prefix=/usr/local/libevent/
# make
# make install
3、 安装memcached
# tar -zxvf memcached-1.4.5.tar.gz
# cd memcached-1.4.5
# ./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent/
# make
# make install
三、配置Memcached
1、启动Memcached
# cd /usr/local/memcached/bin/
# ./memcached -u root -d
2、将Memcached加入系统自动启动
# vim /etc/rc.local
# /usr/local/memcached/bin/memcached -u root -d
3、查看Memcached
# ps -ef |grep memcached