linux 安装 redis3.0
2024-08-24 12:50:50
- 下载
- 解压
- 进入目录
- 编译
$ wget http://download.redis.io/releases/redis-3.2.0.tar.gz
$ tar xzf redis-3.0.0.tar.gz
$ cd redis-3.2.0
$ make
make有时候会出错
原因分析
在README 有这个一段话。
Allocator
Selecting a non-default memory allocator when building Redis is done by setting
the MALLOC
environment variable. Redis is compiled and linked against libc
malloc by default, with the exception of jemalloc being the default on Linux
systems. This default was picked because jemalloc has proven to have fewer
fragmentation problems than libc malloc.
To force compiling against libc malloc, use:
% make MALLOC=libc
To compile against jemalloc on Mac OS X systems, use:
% make MALLOC=jemalloc
说关于分配器allocator, 如果有MALLOC 这个 环境变量, 会有用这个环境变量的 去建立Redis。
而且libc 并不是默认的 分配器, 默认的是 jemalloc, 因为 jemalloc 被证明 有更少的 fragmentation problems 比libc。
但是如果你又没有jemalloc 而只有 libc 当然 make 出错。 所以加这么一个参数。
解决办法
make MALLOC=libc
最新文章
- bzoj2565: 最长双回文串
- commonJS — 数组操作(for Array)
- oracle中in与exists的区别
- 排序,求几个最值问题,输入n个整数,输出其中最小的k个元素。
- C语言中的指针学习(小黑板)
- 段和RSEG用法
- 基于visual Studio2013解决面试题之1203转16进制输出
- Java中反射与常用方法
- HTML学习笔记 css定位浮动及瀑布流案例 第十三节 (原创) 参考使用表
- iOS CocoaPods一些特别的用法 指定版本、版本介绍、忽略警告
- [Alpha阶段]第九次Scrum Meeting
- HTML与CSS的一些知识(二)
- Shell 批量修改主机 用户密码
- Kibana-4.6.6 marvel插件license过期重新注册
- javascript的数组之filter()
- xampp lampp 改变网页root目录的方法
- 基于spring-cloud的微服务(4)API网关zuul
- Open-sourcing sso, the way we secure services at BuzzFeed
- PHP中文件操作(2)-- 写文件
- HDU 1717 小数化分数2 数学题
热门文章
- Linux赛车游戏 SuperTuxKart 1.0 正式发布
- thinkphp 同一字段不同查询条件实现
- ASP.NET-Session与复杂数据类型
- HDU 1131
- 《从零開始学Swift》学习笔记(Day 46)——下标重写
- Android socket 使用PrintWriter和BufferedReader发送和接收出现乱码问题解决
- Android开发工具---SQLiteManager插件
- spring boot系统学习(知识点笔记)
- hdu1525 Euclid&;#39;s Game , 基础博弈
- IE input X 去掉文本框的叉叉和password输入框的眼睛图标