简单介绍Memcache 安装、配置、监控,记录安装过程。
Memcache 安装
[root @memcache-node1 ~]# cd /usr/local/src
[root @memcache-node1 src]# wget http://memcached.googlecode.com/files/memcached-1.4.10.tar.gz
[root @memcache-node1 src]# wget
https://github.com/downloads/libevent/libevent/libevent-2.0.16-stable.tar.gz --no-check-certificate
[root @memcache-node1 src]# tar zxvf libevent-2.0.16-stable.tar.gz
[root @memcache-node1 src]# cd libevent-2.0.16-stable
[root @memcache-node1 libevent-2.0.16-stable]# ./configure --prefix=/usr/local/libevent
[root @memcache-node1 libevent-2.0.16-stable]# make && make install
[root @memcache-node1 src]# tar zxvf memcached-1.4.10.tar.gz
[root @memcache-node1 src]# cd memcached-1.4.10
[root @memcache-node1 memcached-1.4.10]# ./configure --prefix=/usr/local/memcached --enable-64bit
--with-libevent=/usr/local/libevent
[root @memcache-node1 memcached-1.4.10]# make && make install
[root @memcache-node1 ~]# useradd -s /sbin/nologin -M memcached
Memcache启动及参数
[root @memcache-node1 ~]#/usr/local/memcached/bin/memcached -c 51200 -u memcached -m 50000m -d
Memcached for Cacti 监控
安装Python-Memcached
[root @mail ~]# cd /usr/local/src
[root @mail src]# wget ftp://ftp.tummy.com/pub/python-memcached/python-memcached-1.48.tar.gz
[root @mail src]# tar zxvf python-memcached-1.48.tar.gz
[root @mail src]# cd python-memcached-1.48
[root @mail python-memcached-1.48]# yum -y install python-setuptools
[root @mail python-memcached-1.48]# python setup.py install
下载Cacti脚本并上传模板
[root @mail src]# wget http://s1.dlnws.com/dealnews/developers/cacti-memcached-1.0.tar.gz
[root @mail src]# tar zxvf cacti-memcached-1.0.tar.gz
[root @mail cacti-memcached-1.0]# cp memcached.py /var/www/html/scripts/
[root @mail cacti-memcached-1.0]# cd !$
cd /var/www/html/scripts/
[root @mail scripts]# python memcached.py 192.168.1.1
(责任编辑:IT) |