• 下载
  • 解压
  • 进入目录
  • 编译

$ 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

最新文章

  1. bzoj2565: 最长双回文串
  2. commonJS — 数组操作(for Array)
  3. oracle中in与exists的区别
  4. 排序,求几个最值问题,输入n个整数,输出其中最小的k个元素。
  5. C语言中的指针学习(小黑板)
  6. 段和RSEG用法
  7. 基于visual Studio2013解决面试题之1203转16进制输出
  8. Java中反射与常用方法
  9. HTML学习笔记 css定位浮动及瀑布流案例 第十三节 (原创) 参考使用表
  10. iOS CocoaPods一些特别的用法 指定版本、版本介绍、忽略警告
  11. [Alpha阶段]第九次Scrum Meeting
  12. HTML与CSS的一些知识(二)
  13. Shell 批量修改主机 用户密码
  14. Kibana-4.6.6 marvel插件license过期重新注册
  15. javascript的数组之filter()
  16. xampp lampp 改变网页root目录的方法
  17. 基于spring-cloud的微服务(4)API网关zuul
  18. Open-sourcing sso, the way we secure services at BuzzFeed
  19. PHP中文件操作(2)-- 写文件
  20. HDU 1717 小数化分数2 数学题

热门文章

  1. Linux赛车游戏 SuperTuxKart 1.0 正式发布
  2. thinkphp 同一字段不同查询条件实现
  3. ASP.NET-Session与复杂数据类型
  4. HDU 1131
  5. 《从零開始学Swift》学习笔记(Day 46)——下标重写
  6. Android socket 使用PrintWriter和BufferedReader发送和接收出现乱码问题解决
  7. Android开发工具---SQLiteManager插件
  8. spring boot系统学习(知识点笔记)
  9. hdu1525 Euclid's Game , 基础博弈
  10. IE input X 去掉文本框的叉叉和password输入框的眼睛图标