【Redis】Redis各大版本最新版以及系统兼容性测试

        目前Redis总共有四个大版本提供下载,分别是:5.0.xx、6.0.xx、6.2.xx、7.0.xx

        下载地址如下:

        本次安装测试使用的系统为 CentOS 7.9 x86_64,在安装之前,需要预先安装GCC环境,在线安装命令如下:

# yum install -y gcc gcc-c++

Downloading packages:                                
(1/9): glibc-devel-2.17-326.el7_9.x86_64.rpm         
(2/9): cpp-4.8.5-44.el7.x86_64.rpm                   
(3/9): libmpc-1.0.1-3.el7.x86_64.rpm                 
(4/9): libstdc++-devel-4.8.5-44.el7.x86_64.rpm       
(5/9): gcc-c++-4.8.5-44.el7.x86_64.rpm               
(6/9): mpfr-3.1.1-4.el7.x86_64.rpm                   
(7/9): kernel-headers-3.10.0-1160.76.1.el7.x86_64.rpm
(8/9): glibc-headers-2.17-326.el7_9.x86_64.rpm       
(9/9): gcc-4.8.5-44.el7.x86_64.rpm                   

备注:如果服务器在内网,则需要预先将这些安装包(包括依赖包)下载下来,再安装。

GCC环境安装好后,逐个解压上面下载的四个版本包,然后分别进入安装包中执行编译

# make

备注:为了测试,make install 可先不执行。

        测试结果让我感觉有点意外,在CentOS 7.9系统中,Redis 5.0.14、6.2.7、7.0.5这三个版本可以成功编译、安装和运行,但是6.0.16版本,在CentOS7.9上编译失败,网上查询资料,应该与CentOS7自带的GCC的版本过低有关。

[root@www ~]# gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright © 2015 Free Software Foundation, Inc.
本程序是自由软件;请参看源代码的版权声明。本软件没有任何担保;
包括没有适销性和某一专用目的下的适用性担保。
[root@www redis-7.0.5]# redis-server
20060:C 27 Sep 2022 08:53:34.390 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
20060:C 27 Sep 2022 08:53:34.390 # Redis version=7.0.5, bits=64, commit=00000000, modified=0, pid=20060, just started
20060:C 27 Sep 2022 08:53:34.390 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
20060:M 27 Sep 2022 08:53:34.390 * Increased maximum number of open files to 10032 (it was originally set to 1024).
20060:M 27 Sep 2022 08:53:34.390 * monotonic clock: POSIX clock_gettime
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 7.0.5 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                  
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 20060
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           https://redis.io       
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

20060:M 27 Sep 2022 08:53:34.391 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
20060:M 27 Sep 2022 08:53:34.391 # Server initialized
20060:M 27 Sep 2022 08:53:34.391 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
[root@www redis-6.2.7]# redis-server 
14326:C 27 Sep 2022 08:30:53.858 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
14326:C 27 Sep 2022 08:30:53.858 # Redis version=6.2.7, bits=64, commit=00000000, modified=0, pid=14326, just started
14326:C 27 Sep 2022 08:30:53.859 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
14326:M 27 Sep 2022 08:30:53.859 * Increased maximum number of open files to 10032 (it was originally set to 1024).
14326:M 27 Sep 2022 08:30:53.859 * monotonic clock: POSIX clock_gettime
14326:M 27 Sep 2022 08:30:53.860 # A key '__redis__compare_helper' was added to Lua globals which is not on the globals allow list nor listed on the deny list.
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 6.2.7 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                  
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 14326
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           https://redis.io       
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

14326:M 27 Sep 2022 08:30:53.860 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
14326:M 27 Sep 2022 08:30:53.860 # Server initialized
14326:M 27 Sep 2022 08:30:53.860 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
[root@www redis-5.0.14]# redis-server
15521:C 27 Sep 2022 08:43:51.843 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
15521:C 27 Sep 2022 08:43:51.843 # Redis version=5.0.14, bits=64, commit=00000000, modified=0, pid=15521, just started
15521:C 27 Sep 2022 08:43:51.843 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
15521:M 27 Sep 2022 08:43:51.844 * Increased maximum number of open files to 10032 (it was originally set to 1024).
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 5.0.14 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 15521
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

15521:M 27 Sep 2022 08:43:51.844 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
15521:M 27 Sep 2022 08:43:51.844 # Server initialized
15521:M 27 Sep 2022 08:43:51.844 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
15521:M 27 Sep 2022 08:43:51.844 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
15521:M 27 Sep 2022 08:43:51.844 * Ready to accept connections
  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
Redis和Spring Boot的版本兼容性是一个常见的问题。通常情况下,Redis与Spring Boot的版本兼容性是相对较好的,但仍然需要注意一些细节。 首先,需要确保你使用的Redis客户端与Spring Boot的版本兼容。Spring Boot默认使用的是Lettuce作为Redis客户端,你可以通过在pom.xml文件中添加以下依赖来引入Lettuce: ```xml <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> ``` 其次,要注意Spring Boot和Redis之间的一些细节差异。例如,Spring Boot 2.x版本默认使用的是RedisTemplate来进行Redis操作,而在Spring Boot 1.x版本中默认使用的是Jedis。如果你在升级Spring Boot版本时遇到问题,可能需要调整一些配置。 另外,还要注意Redis服务器的版本兼容性。不同的Redis服务器版本可能会有一些差异,特别是在一些新功能的引入和行为变更方面。因此,在选择Redis服务器版本时,建议查看官方文档或者社区讨论,以确保与你使用的Spring Boot版本兼容。 总结起来,要确保Redis与Spring Boot的版本兼容,你需要注意以下几点: 1. 使用与Spring Boot版本兼容的Redis客户端,如Lettuce。 2. 确认Spring Boot和Redis之间的一些细节差异,并进行相应的调整。 3. 选择与你使用的Spring Boot版本兼容的Redis服务器版本。 希望对你有帮助!如果你有其他问题,请随时提问。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

cnskylee

技术分享我是认真的,期待您打赏

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值