redis:

安装:

$ wget http://download.redis.io/releases/redis-3.2.7.tar.gz

$ tar xzf redis-3.2.7.tar.gz

$ cd redis-3.2.7

$ make

报错:zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory

README.md中:

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,而只有libc,就会make出错,所以需要添加参数.

解决:$ make MALLOC=libc

启动redis失败:

vim /usr/local/redis/etc/redis.conf

daemonize yes ---将daemonize的值修改为yes.

redis密码设置:

方法1:

vim /usr/local/redis/etc/redis.conf

requirepass kasumi 去掉本行的注释 ----重启服务

$redis-cli -h 127.0.0.1 -p 6379 -a kasumi ---使用密码登录执行成功.

方法2:

config set requirepass kasumi

修改后不需要重启服务,但是服务重启后,会使用配置文件中的密码.

最新文章

  1. LeetCode House Robber III
  2. Codeforces 271 Div 2 A Keyboard
  3. JavaScript基础--面向对象三大特性(八):继承封装多态
  4. Beta项目冲刺汇总贴
  5. Tr A(矩阵快速幂)
  6. 25. Reverse Nodes in k-Group
  7. layout相关
  8. Java [leetcode 22]Generate Parentheses
  9. Oracle中的AS和IS
  10. dnw for linux: Ubuntu下可用,无需编译驱动,mini2440可用
  11. README 语法编写
  12. c# 输出excel、word实例只需一行代码
  13. Docker - 生成镜像
  14. Java基础知识二次学习--第六章 常用类
  15. swiper拖拽之后不自动滑动问题
  16. Python之scrapy实例1
  17. 自主学习之RxSwift(一) -----Driver
  18. 记录未预编译文件“*.aspx”,因此不能请求该文件的几种处理办法
  19. python(leetcode)-66加一问题
  20. sqlserver 跨服务器备份表

热门文章

  1. 几个与特殊字符处理有关的PHP函数(过滤html js 标签)
  2. j2ee 项目部署指引
  3. Android SearchView设置与用法的那点事儿
  4. ZooKeeper翻译(一)
  5. 设置zookeeper开机自启动
  6. Java 异常(Java Exception)
  7. socket 极值数量
  8. 【BZOJ4818】【SDOI2017】序列计数 [矩阵乘法][DP]
  9. 「6月雅礼集训 2017 Day10」perm(CodeForces 698F)
  10. 【BZOJ】1697: [Usaco2007 Feb]Cow Sorting牛排序