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

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

  • 相关阅读:
    C++中的结构体
    C++转换
    C++常见问题解答
    hdu 1491
    hdu 1253
    [恢]hdu 2529
    [恢]hdu 2539
    hdu 1708
    [恢]hdu 2512
    [恢]hdu 2401
  • 原文地址:https://www.cnblogs.com/soymilk2019/p/13306729.html
Copyright © 2011-2022 走看看