1、下载redis 地址 http://download.redis.io/releases/redis-5.0.2.tar.gz

2、解压tar -zxf redis-5.0.2.tar.gz

3、make编译

3.1 缺少gcc环境需要yum install gcc

3.2 报错:

[root@lang redis-5.0.2]# make
cd src && make all
make[1]: Entering directory `/usr/local/redis-4.0.10/src'
    CC adlist.o
In file included from adlist.c:34:
zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error "Newer version of jemalloc required"
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory `/usr/local/redis-4.0.10/src'
make: *** [all] Error 2

redis解压目录下有个README.md文件中有如下一段话:

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

4、编译加上MALLOC=libc 即可

   #make MALLOC=libc

5、运行redis

修改配置文件 redis.conf

daemonize no 改为 yes 后台运行:

protected-mode yes 改为no 可以不用输入密码登陆

bind 127.0.0.1  表示只可以本机访问,要是远程访问需要注释掉(前面加#号)

6、带配置文件后台启动

[root@lang redis-5.0.2]# src/redis-server redis.conf
7897:C 06 Dec 2018 06:25:57.484 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
7897:C 06 Dec 2018 06:25:57.484 # Redis version=5.0.2, bits=64, commit=00000000, modified=0, pid=7897, just started
7897:C 06 Dec 2018 06:25:57.484 # Configuration loaded
[root@lang redis-5.0.2]# ps -ef | grep redis
root       7898      1  4 06:25 ?        00:00:00 src/redis-server *:6379   
root       7903   2880  0 06:25 pts/1    00:00:00 grep redis
[root@lang redis-5.0.2]#

Linux下安装Redis5.0.2的更多相关文章

  1. Linux 下安装 redis5.0

    1.redis 安装 wget http://download.redis.io/rele... tar -zxvf redis-5.0.5.tar.gz cd redis-5.0.5.tar.gz ...

  2. CentOS7.6下安装Redis5.0.7

    此次安装是在CentOS7下安装Redis5.0.7 一.首先准备Redis安装包 这里下载的是 redis-5.0.7.tar.gz 安装包,并将其直接放在了 root ⽬录下 压缩包下载地址:ht ...

  3. linux下安装opencv3.0

    查版本gcc --version 需>4.8python 2.7+cmake --version numpy 以上是必须的 linux下安装opencv3.0<pre>https:/ ...

  4. Linux下安装3.0以上的python

    Linux下自带的python2.7是不建议删除的,很多系统软件依赖python2.7,但是现在我们学习python一般需要python3.0,下面介绍安装python3.0. 1.进入python官 ...

  5. CentOS7下安装Redis5.0.2

    1.下载redis 地址 http://download.redis.io/releases/redis-5.0.2.tar.gz 2.解压tar -zxf redis-5.0.2.tar.gz 3. ...

  6. Centos7.4下安装Redis5.0

    一.下载Redis Redis下载地址:https://redis.io/download 二.安装依赖包 安装Redis之前需要安装c++命令 yum install gcc-c++ 三.上传并解压 ...

  7. Linux下安装Julia1.0.0

    MIT正式发布编程语言Julia 1.0:Python.R.C++三合一! 由于官方文档提示中安装的不是最新的Julia版本,官方的0.7版本安装方法为:                       ...

  8. Linux下安装redis-4.0.10

    1.下载redis-4.0.10 在redis官网(https://redis.io/download)下载redis-4.0.10 2.将安装包上传至Linux服务器 在Linux服务器根目录下创建 ...

  9. linux下安装mysql8.0.x步骤

    1.下载mysql mysql官网:https://dev.mysql.com/downloads/mysql/ 将下载的mysql上传打linux 2.解压并重命名 [root@rsyncClien ...

随机推荐

  1. 793. Preimage Size of Factorial Zeroes Function

    Let f(x) be the number of zeroes at the end of x!. (Recall that x! = 1 * 2 * 3 * ... * x, and by con ...

  2. Ubuntu解决中文乱码

    gsettings set org.gnome.gedit.preferences.encodings candidate-encodings "['GB18030', 'UTF-8', ' ...

  3. pip 安装出现提示

    The directory '/home/zdj/.cache/pip/http' or its parent directory is not owned by the current user a ...

  4. iOS 获取当前响应链的First Responder (Swift)

    import UIKit private weak var currentFirstResponder: AnyObject? extension UIResponder { static func ...

  5. Spring + MyBaits java.lang.reflect.InvocationTargetException 启动日志报错

    调试发现 实例化 class org.apache.ibatis.logging.slf4j.Slf4jImpl时发生异常,所以 slf4j jar 问题解决: http://www.cnblogs. ...

  6. 根据 目录号 案卷号 用户名 查询 page 中 的条数

    select count(*) from am_b_page a join am_b_entry b on a.entry_id=b.entry_id where b.catalogue_code=' ...

  7. RHEL 6.5----Nginx负载均衡

    实验环境 主机名 IP master 192.168.30.130 node-1 192.168.30.131 node-2 192.168.30.132 在master上安装 本次安装过程统一采用Y ...

  8. java中的compareto方法以及LIst列表排序的详细介绍【转】

    java中的compareto方法的详细介绍 javacompareTo  java中的compareto方法,返回参与比较的前后两个字符串的asc码的差值,看下面一组代码 String a=&quo ...

  9. JS执行保存在数据库中的JS代码

    function createScript(script) { var myScript = document.createElement("script"); myScript. ...

  10. 06.NopCommerce配置邮箱账户

    NopCommerce如果配置让用户注册为通过邮箱注册,并且注册后激活邮箱才可登录,那么我们需要对NopCommerce的邮箱账户进行配置,用来发送邮件用.当然邮件还有很多其他用途,比如发送用户订阅的 ...