zoukankan      html  css  js  c++  java
  • centos7搭建redis(单机)

    根据官网的方法安装:

    Installation

    Download, extract and compile Redis with:

    $ cd /usr/local
    $ wget http://download.redis.io/releases/redis-6.0.5.tar.gz
    $ tar xzf redis-6.0.5.tar.gz
    $ cd redis-6.0.5
    $ make

    The binaries that are now compiled are available in the src directory. Run Redis with:

    $ src/redis-server

    You can interact with Redis using the built-in client:

    $ src/redis-cli
    redis> set foo bar
    OK
    redis> get foo
    "bar"

    可能会碰到“没有什么成员的错误”,解决办法如下:

    [root@localhost redis-6.0.1]# gcc -v                             # 查看gcc版本
    [root@localhost redis-6.0.1]# yum -y install centos-release-scl  # 升级到9.1版本
    [root@localhost redis-6.0.1]# yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
    [root@localhost redis-6.0.1]# scl enable devtoolset-9 bash
    以上为临时启用,如果要长期使用gcc 9.1的话:
    [root@localhost redis-6.0.1]# echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile
    

    重新make

    make
    

    执行make test 报错:  pending querybuf: check size of pending_querybuf after set a big value intests/unit/pendingquerybuf.tcl the used_memory of replica is much larger than master. Master:43869232Replica:69031856

    解决如下:直接调整虚拟机的内存

  • 相关阅读:
    Syn Bot /OSCOVA 基础教程(2)
    Syn Bot /OSCOVA 介绍(1)
    如何访问阿里云内网数据库
    Winform项目中的Settings.settings与App.config
    WinForm项目开发傻瓜教程
    C++读取BMP文件
    boost异步tcp通信技术练习
    lex/flex 学习笔记 一
    流数据解析中高位地址转换的性能分析
    bash随笔
  • 原文地址:https://www.cnblogs.com/soymilk2019/p/13306729.html
Copyright © 2011-2022 走看看