根据官网的方法安装:

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 报错:  69031856

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

 

相关文章:

  • 2022-02-05
  • 2021-12-30
  • 2021-10-21
  • 2021-06-02
  • 2021-04-13
  • 2021-07-16
  • 2021-07-27
  • 2021-10-08
猜你喜欢
  • 2021-10-29
  • 2021-07-16
  • 2022-01-07
  • 2021-04-23
  • 2021-10-29
  • 2021-05-02
  • 2022-02-26
相关资源
相似解决方案