redis6.0.9安装

2024-06-15 23:48
文章标签 安装 redis6.0

本文主要是介绍redis6.0.9安装,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

1下载redis6.0.9

[root@linux-001 ~]# wget http://download.redis.io/releases/redis-6.0.9.tar.gz[root@linux-001 ~]# tar -xf redis-6.0.9.tar.gz  /opt/[root@linux-001 ~]# cd /opt/redis-6.0.9

2 安装redis6.0.9

在进行make的时候出现如下报错:

[root@linux-001 redis-6.0.9]# makeserver.c:5320:44: 错误:‘struct redisServer’没有名为‘tlsfd_count’的成员if (server.ipfd_count > 0 || server.tlsfd_count > 0)^
server.c:5322:19: 错误:‘struct redisServer’没有名为‘sofd’的成员if (server.sofd > 0)^
server.c:5323:94: 错误:‘struct redisServer’没有名为‘unixsocket’的成员serverLog(LL_NOTICE,"The server is now ready to accept connections at %s", server.unixsocket);^
server.c:5324:19: 错误:‘struct redisServer’没有名为‘supervised_mode’的成员if (server.supervised_mode == SUPERVISED_SYSTEMD) {^
server.c:5325:24: 错误:‘struct redisServer’没有名为‘masterhost’的成员if (!server.masterhost) {^
server.c:5335:19: 错误:‘struct redisServer’没有名为‘supervised_mode’的成员if (server.supervised_mode == SUPERVISED_SYSTEMD) {^
server.c:5342:15: 错误:‘struct redisServer’没有名为‘maxmemory’的成员if (server.maxmemory > 0 && server.maxmemory < 1024*1024) {^
server.c:5342:39: 错误:‘struct redisServer’没有名为‘maxmemory’的成员if (server.maxmemory > 0 && server.maxmemory < 1024*1024) {^
server.c:5343:176: 错误:‘struct redisServer’没有名为‘maxmemory’的成员serverLog(LL_WARNING,"WARNING: You specified a maxmemory value that is less than 1MB (current value is %llu bytes). Are you sure this is what you really want?", server.maxmemory);^
server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员redisSetCpuAffinity(server.server_cpulist);^
server.c: 在函数‘hasActiveChildProcess’中:
server.c:1478:1: 警告:在有返回值的函数中,控制流程到达函数尾 [-Wreturn-type]}^
server.c: 在函数‘allPersistenceDisabled’中:
server.c:1484:1: 警告:在有返回值的函数中,控制流程到达函数尾 [-Wreturn-type]}^
server.c: 在函数‘writeCommandsDeniedByDiskError’中:
server.c:3934:1: 警告:在有返回值的函数中,控制流程到达函数尾 [-Wreturn-type]}^
server.c: 在函数‘iAmMaster’中:
server.c:5134:1: 警告:在有返回值的函数中,控制流程到达函数尾 [-Wreturn-type]}^
make[1]: *** [server.o] 错误 1
make: *** [all] 错误 2
[root@linux-002 redis-6.0.9]# cat install.log
cd src && make all
make[1]: 进入目录“/opt/redis-6.0.9/src”
make[1]: 离开目录“/opt/redis-6.0.9/src”

解决办法:

[root@linux-001 redis-6.0.9]# yum -y install centos-release-scl[root@linux-001 redis-6.0.9]# yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils##以下为临时启用gcc 9.3:
[root@linux-002 redis-6.0.9]# scl enable devtoolset-9 bash
[root@linux-002 redis-6.0.9]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-9/root/usr --mandir=/opt/rh/devtoolset-9/root/usr/share/man --infodir=/opt/rh/devtoolset-9/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-9.3.1-20200408/obj-x86_64-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC)

如果是长期使用gcc9.3需要使用命令: echo “source /opt/rh/devtoolset-9/enable” >>/etc/profile,继续执行make操作

[root@linux-001 redis-6.0.9]# make
cd src && make all
make[1]: 进入目录“/opt/redis-6.0.9/src”CC server.oCC sds.oCC zmalloc.oCC lzf_c.oCC lzf_d.oCC pqsort.oCC zipmap.oCC sha1.oCC ziplist.oCC release.oCC networking.oCC util.oCC object.oCC db.oCC replication.oCC rdb.oCC t_string.oCC t_list.oCC t_set.oCC t_zset.oCC t_hash.oCC config.oCC aof.oCC pubsub.oCC multi.oCC debug.oCC sort.oCC intset.oCC syncio.oCC cluster.oCC crc16.oCC endianconv.oCC slowlog.oCC scripting.oCC bio.oCC rio.oCC rand.oCC memtest.oCC crcspeed.oCC crc64.oCC bitops.oCC sentinel.oCC notify.oCC setproctitle.oCC blocked.oCC hyperloglog.oCC latency.oCC sparkline.oCC redis-check-rdb.oCC redis-check-aof.oCC geo.oCC lazyfree.oCC module.oCC evict.oCC expire.oCC geohash.oCC geohash_helper.oCC childinfo.oCC defrag.oCC siphash.oCC rax.oCC t_stream.oCC listpack.oCC localtime.oCC lolwut.oCC lolwut5.oCC lolwut6.oCC acl.oCC gopher.oCC tracking.oCC connection.oCC tls.oCC sha256.oCC timeout.oCC setcpuaffinity.oLINK redis-serverINSTALL redis-sentinelCC redis-cli.oLINK redis-cliCC redis-benchmark.oLINK redis-benchmarkINSTALL redis-check-rdbINSTALL redis-check-aofHint: It's a good idea to run 'make test' ;)make[1]: 离开目录“/opt/redis-6.0.9/src”[root@linux-001 redis-6.0.9]# make install
cd src && make install
make[1]: 进入目录“/opt/redis-6.0.9/src”Hint: It's a good idea to run 'make test' ;)INSTALL installINSTALL installINSTALL installINSTALL installINSTALL install
make[1]: 离开目录“/opt/redis-6.0.9/src”

3. make test 操作

执行make test又会有如下报错:

[root@linux-002 redis-6.0.9]# make test
cd src && make test
make[1]: 进入目录“/opt/redis-6.0.9/src”
You need tcl 8.5 or newer in order to run the Redis test
make[1]: *** [test] 错误 1
make[1]: 离开目录“/opt/redis-6.0.9/src”
make: *** [test] 错误 2

上代码报错信息需要安装tcl即可解决。

[root@linux-002 redis-6.0.9]# yum install tcl
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* centos-sclo-rh: mirrors.163.com* centos-sclo-sclo: mirrors.ustc.edu.cn* epel: mirrors.neusoft.edu.cn* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 tcl.x86_64.1.8.5.13-8.el7 将被 安装
--> 解决依赖关系完成依赖关系解决==================================================================================================================================================================================================================Package                                        架构                                              版本                                                      源                                               大小
==================================================================================================================================================================================================================
正在安装:tcl                                            x86_64                                            1:8.5.13-8.el7                                            base                                            1.9 M事务概要
==================================================================================================================================================================================================================
安装  1 软件包总下载量:1.9 M
安装大小:4.4 M
Is this ok [y/d/N]: y
Downloading packages:
tcl-8.5.13-8.el7.x86_64.rpm                                                                                                                                                                | 1.9 MB  00:00:05
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction正在安装    : 1:tcl-8.5.13-8.el7.x86_64                                                                                                                                                                     1/1验证中      : 1:tcl-8.5.13-8.el7.x86_64                                                                                                                                                                     1/1已安装:tcl.x86_64 1:8.5.13-8.el7完毕!

执行make test的结果如下
在这里插入图片描述

这篇关于redis6.0.9安装的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1064926

相关文章

Python中win32包的安装及常见用途介绍

《Python中win32包的安装及常见用途介绍》在Windows环境下,PythonWin32模块通常随Python安装包一起安装,:本文主要介绍Python中win32包的安装及常见用途的相关... 目录前言主要组件安装方法常见用途1. 操作Windows注册表2. 操作Windows服务3. 窗口操作

gitlab安装及邮箱配置和常用使用方式

《gitlab安装及邮箱配置和常用使用方式》:本文主要介绍gitlab安装及邮箱配置和常用使用方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录1.安装GitLab2.配置GitLab邮件服务3.GitLab的账号注册邮箱验证及其分组4.gitlab分支和标签的

MySQL MCP 服务器安装配置最佳实践

《MySQLMCP服务器安装配置最佳实践》本文介绍MySQLMCP服务器的安装配置方法,本文结合实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下... 目录mysql MCP 服务器安装配置指南简介功能特点安装方法数据库配置使用MCP Inspector进行调试开发指

在Windows上使用qemu安装ubuntu24.04服务器的详细指南

《在Windows上使用qemu安装ubuntu24.04服务器的详细指南》本文介绍了在Windows上使用QEMU安装Ubuntu24.04的全流程:安装QEMU、准备ISO镜像、创建虚拟磁盘、配置... 目录1. 安装QEMU环境2. 准备Ubuntu 24.04镜像3. 启动QEMU安装Ubuntu4

Python UV安装、升级、卸载详细步骤记录

《PythonUV安装、升级、卸载详细步骤记录》:本文主要介绍PythonUV安装、升级、卸载的详细步骤,uv是Astral推出的下一代Python包与项目管理器,主打单一可执行文件、极致性能... 目录安装检查升级设置自动补全卸载UV 命令总结 官方文档详见:https://docs.astral.sh/

Nexus安装和启动的实现教程

《Nexus安装和启动的实现教程》:本文主要介绍Nexus安装和启动的实现教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、Nexus下载二、Nexus安装和启动三、关闭Nexus总结一、Nexus下载官方下载链接:DownloadWindows系统根

Java SWT库详解与安装指南(最新推荐)

《JavaSWT库详解与安装指南(最新推荐)》:本文主要介绍JavaSWT库详解与安装指南,在本章中,我们介绍了如何下载、安装SWTJAR包,并详述了在Eclipse以及命令行环境中配置Java... 目录1. Java SWT类库概述2. SWT与AWT和Swing的区别2.1 历史背景与设计理念2.1.

安装centos8设置基础软件仓库时出错的解决方案

《安装centos8设置基础软件仓库时出错的解决方案》:本文主要介绍安装centos8设置基础软件仓库时出错的解决方案,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录安装Centos8设置基础软件仓库时出错版本 8版本 8.2.200android4版本 javas

Pytorch介绍与安装过程

《Pytorch介绍与安装过程》PyTorch因其直观的设计、卓越的灵活性以及强大的动态计算图功能,迅速在学术界和工业界获得了广泛认可,成为当前深度学习研究和开发的主流工具之一,本文给大家介绍Pyto... 目录1、Pytorch介绍1.1、核心理念1.2、核心组件与功能1.3、适用场景与优势总结1.4、优

conda安装GPU版pytorch默认却是cpu版本

《conda安装GPU版pytorch默认却是cpu版本》本文主要介绍了遇到Conda安装PyTorchGPU版本却默认安装CPU的问题,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的... 目录一、问题描述二、网上解决方案罗列【此节为反面方案罗列!!!】三、发现的根本原因[独家]3.1 p