且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

CentOS 6 安装最新的 Redis 2.8 ,安装 TCMalloc

更新时间:2022-08-13 11:04:14


1,遇到的问题就是 redis 2.8 版本依赖 Google 的 TCMalloc


TCMalloc(Thread-Caching Malloc)是google开发的开源工具──“google-perftools”中的成员。与标准的glibc库的malloc相比,

TCMalloc在内存的分配上效率和速度要高得多,可以在很大程度上提高MySQL服务器在高并发情况下的性能,降低系统负载。


2,安装 TCMalloc 

使用rpm 安装,下载 gperftools-libs 进行安装,这个lib包括了TCMalloc 这个lib库。

http://pkgs.org/centos-6/atomic-x86_64/gperftools-libs-2.0-11.el6.1.art.x86_64.rpm.html

rpm -ivh gperftools-libs-2.0-11.el6.1.art.x86_64.rpm

查看是否安装成功:

ls /usr/lib64/libtcmalloc.so.4.1.0


3,下载redis安装

http://pkgs.org/download/redis

http://pkgs.org/centos-6/remi-x86_64/redis-2.8.8-1.el6.remi.x86_64.rpm.html

CentOS 6 安装最新的 Redis 2.8 ,安装 TCMalloc

rpm安装 redis-2.8.9-1.el6.remi.x86_64.rpm

rpm -ivh redis-2.8.9-1.el6.remi.x86_64.rpm

启动reids:

service redis start

设置开机启动:

chkconnfig redis on