当前位置:网站首页>从零安装Redis
从零安装Redis
2022-07-06 19:11:00 【skyline_wx】
从零安装Redis
安装
- 进入Redis官网https://redis.io/
- 点击Get Start,进入引导页
- 点击Install Redis from Source
- 如果要安装最新的稳定版,那么直接执行如下命令即可
wget https://download.redis.io/redis-stable.tar.gz
- 如果想安装具体的版本,那么可以到这里查看所有稳定版的下载链接https://github.com/redis/redis-hashes
- 我这里安装的Redis 6.x的最后一个版本
- 下载好后,执行解压命令
tar -xzvf redis-6.2.7.tar.gz
- 切换到redis-6.2.7下,执行
make
- 如果出现报错,则可能是gcc没有安装
- 安装gcc
yum install gcc
- 安装完成后,再次执行
make
,如果出现下面的错误,改成make MALLOC=libc
- 如果
make
成功,那么我们应该可以在src目录下找到redis-server和redis-cli这两个文件 - 到此为止,我们已经可以使用redis-server来启动rRedis了。但是如果要把Redis安装到
/usr/local/bin
下,那还需要执行make install
- 尝试使用命令
redis-server
启动Redis,执行完成后,看到这个页面则表示启动成功 - 使用
ctrl+c
来停止Redis
Redis常用配置修改
设置Redis允许外部ip访问。注释掉
bind 127.0.0.1 -::1
或者设置bind * -::*
设置密码。在
requirepass
后面写上你需要的密码即可设置后台运行。将
daemonize
设置为yes使用文件启动redis。
redis-server redis.conf
使用工具链接Redis
如果连接失败,可以关掉防火墙再试试
systemctl stop firewalld.service
停止Redis
redis-cli -h 127.0.0.1 -p 6379 -a foobared shutdown
边栏推荐
- How to build a 32core raspberry pie cluster from 0 to 1
- Lombok makes the pit of ⽤ @data and @builder at the same time
- MySQL
- 电气工程及其自动化
- MetaForce原力元宇宙佛萨奇2.0智能合约系统开发(源码部署)
- Code line breaking problem of untiy text box
- 普通测试年薪15w,测试开发年薪30w+,二者差距在哪?
- KYSL 海康摄像头 8247 h9 isapi测试
- Apifox, is your API interface document rolled up like this?
- Apifox,你的API接口文档卷成这样了吗?
猜你喜欢
MES管理系统的应用和好处有哪些
一文读懂Faster RCNN
[unity notes] screen coordinates to ugui coordinates
The panel floating with the mouse in unity can adapt to the size of text content
dotConnect for DB2数据提供者
基于ensp防火墙双击热备二层网络规划与设计
Apifox, is your API interface document rolled up like this?
1--新唐nuc980 NUC980移植 UBOOT,从外部mx25l启动
用全连接+softmax对图片的feature进行分类
Draco - gltf model compression tool
随机推荐
一本揭秘字节万台节点ClickHouse背后技术实现的白皮书来了!
postgresql 之 数据目录内部结构 简介
Oracle中日期的使用方法实例
C#/VB.NET 删除Word文档中的水印
PCL 常用拟合模型及使用方法
Argo workflows source code analysis
What management points should be paid attention to when implementing MES management system
阿里云易立:云原生如何破解企业降本提效难题?
wzoi 1~200
Apifox,你的API接口文档卷成这样了吗?
基于ensp防火墙双击热备二层网络规划与设计
unity webgl自适应网页尺寸
MySQL
Pgadmin4 of PostgreSQL graphical interface tool
Web3对法律的需求
C # / vb. Net supprime le filigrane d'un document word
MMDetection3D加载毫米波雷达数据
MetaForce原力元宇宙佛萨奇2.0智能合约系统开发(源码部署)
6-6 vulnerability exploitation SSH security defense
Here comes a white paper to uncover the technology behind Clickhouse, a node with 10000 bytes!