当前位置:网站首页>基于CenterOS7安装Redis及常见问题解决(带图讲解)
基于CenterOS7安装Redis及常见问题解决(带图讲解)
2022-06-10 22:29:00 【小钟要学习!!!】
基于CenterOS7安装Redis及常见问题解决
创建的两个安装问题请完下面看
1、下载安装包与安装
官方下载地址:https://redis.io/download/
直接在win平台上下载解压包然后上传到虚拟机再安装
直接点击版本进行下载压缩文件
在虚拟机上通过命令执行远程下载安装redis安装包
远程安装地址(版本自己选择)
wget http://download.redis.io/releases/redis-?.?.?.tar.gz如果提示
wget未找到命令的先执行下面的代码进行插件安装,安装完成会有提示,再次允许上面的下载地址yum -y install wget下载之后可以通过
ll命令查看当前目录的文件是否存在,这里是win下载上传的,然后解压文件定位到上传的文件夹,然后解压redis压缩包
tar –xvf 文件名.tar.gz解压文件之后,再次cd进入到解压的文件中查看文件目录,使用
ll目录![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-6G0zeAE0-1654870578779)(images/image-20220610211618336.png)]](/img/cb/a5fc73f9789082590b51c493175211.png)
cat Makefile // 可以查看安装的位置如下 # Top level makefile, the real shit is at src/Makefile default: all .DEFAULT: cd src && $(MAKE) [email protected] install: cd src && $(MAKE) [email protected] .PHONY: install通过下面的语句编译安装(编译需要时间耐心等待,如果出现安装错误按照下面的步骤走)
make install如果按照成功,使用cd命令进入到安装目录src中,然后通过
ll命令查看是否安装成功,出现如下代表成功了![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-c2LLk89B-1654870578780)(images/image-20220610212021820.png)]](/img/9d/99bbd3ef10c622e7abd22c4d4eef64.png)
安装报错请往下看
第一个错误就是上面提到的
-bash: wget: 未找到命令,已经解决第二个编译报错
gcc:命令未找到,执行下面的语句解决问题yum -y install gcc automake autoconf libtool make![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-WlxMmi2W-1654870578780)(images/image-20220610212509954.png)]](/img/bd/d419af3d351e3e2b71781f5861d8f4.png)
第三个编译错误
zmalloc.h:50:31: 致命错误:jemalloc/jemalloc.h:没有那个文件或目录,执行下面的语句解决问题![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-EeOIoN7r-1654870578781)(images/image-20220610212727871.png)]](/img/99/62de5b845664ba1ca3f5088f44a8f7.png)
注意:下面的语句需要在解压包的文件下执行(等于编译,需要花点时间)
make MALLOC=libc![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-9LoxjKH2-1654870578782)(images/image-20220610213013211.png)]](/img/f9/e13dc79799f6f6e47913ba4db6d5d0.png)
启动src目录的
redis-server服务![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-dKyicw2t-1654870578782)(images/image-20220610213130018.png)]](/img/19/5d804f2f376af356c338fdcfad6a82.png)
由于当前页面用来启动了redis服务器,所以不能执行命令了,需要复制一个标签
进入安装目录,然后启动
redis-cli,就可以操作了![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-xpJeiv7o-1654870578783)(images/image-20220610213309106.png)]](/img/d3/8520dbf94c6e75414f42d043e557cd.png)
2、修改Redis端口
使用如下命令修改端口可以启动多个redis服务
redis-server --port 6380
启动客户端的时候也需要指定端口
redis-cli -p 6380
边栏推荐
- mysql 表机制
- Leetcode 501: mode dans l'arbre de recherche binaire
- Wireshark抓取rtp负载ts流介绍(UDP组播)
- 字蛛(font-spider)教学——ttf/otf字体文件压缩
- Data and information resource sharing platform (6)
- Creation of thread pool
- Development and implementation of AI intelligent video analysis easycvr platform device channel batch deletion function
- Is it safe to open a BOC securities account? Is the risk high?
- Reptiles learn knowledge
- 中银证券股票开户安全吗?是正规的吗?
猜你喜欢

LeetCode 501 :二叉搜索樹中的眾數

Fiddler simulates low-speed network environment

PwnTheBox,Web:hello

VS 番茄助手添加头注释 以及使用方式

Interface test learning notes

Kotlin语言现在怎么不火了?

Prefer "big and small weeks", only write 200 lines of code every day, and the monthly salary of 8k-17k people will rise again

Data and information resource sharing platform (VII)

项目实训11——对数据库的定时备份

The time (in minutes) required for a group of workers to cooperate to complete the assembly process of a part are as follows:
随机推荐
Why is the kotlin language not popular now?
mysql 表机制
LeetCode+ 16 - 20
Developers changing the world - Yao Guang teenagers playing Tetris
Redis list list common commands
项目实训11——对数据库的定时备份
Creating dynamic two-dimensional array with C language
苹果CMS采集站源码-搭建教程-附带源码-全新源码-开发文档
Interface test learning notes
Sentinel
Executor - Shutdown、ShutdownNow、awaitTermination 详解与实战
Development and implementation of AI intelligent video analysis easycvr platform device channel batch deletion function
怎么生成自动参考文献(简单 有图)
第六章——分枝限界法
The data file insurance CSV contains 1338 observations, that is, the registered beneficiaries of the insurance plan and the characteristics that represent the characteristics of patients and the total
This article introduces you to j.u.c's futuretask, fork/join framework and BlockingQueue
300题 线代第一讲行列式
34. 在排序数组中查找元素的第一个和最后一个位置-二分查找、双指针
项目实训12——解析建表的SQL语句
Leetcode 501: mode dans l'arbre de recherche binaire