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

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

 

原文链接: https://www.cnblogs.com/soymilk2019/p/13306729.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍;

也有高质量的技术群,里面有嵌入式、搜广推等BAT大佬

    centos7搭建redis(单机)

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/366474

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年3月2日 下午4:43
下一篇 2023年3月2日 下午4:44

相关推荐