当前位置:网站首页>从零安装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
边栏推荐
- fiddler的使用
- Difference and the difference between array and array structure and linked list
- 记一次JAP查询导致OOM的问题分析
- 一文读懂Faster RCNN
- Halcon instance to opencvsharp (C openCV) implementation -- bottle mouth defect detection (with source code)
- 1个月增长900w+播放!总结B站顶流恰饭的2个新趋势
- HAVE FUN | “飞船计划”活动最新进展
- Oracle中日期的使用方法实例
- Niuke programming problem -- double pointer of 101 must be brushed
- Electrical engineering and automation
猜你喜欢

Application analysis of face recognition

Mmdetection3d loads millimeter wave radar data
![[Mori city] random talk on GIS data (II)](/img/5a/dfa04e3edee5aa6afa56dfe614d59f.jpg)
[Mori city] random talk on GIS data (II)

Processus général de requête pour PostgreSQL

你不可不知道的Selenium 8种元素定位方法,简单且实用

Classify the features of pictures with full connection +softmax

AWS学习笔记(一)

KYSL 海康摄像头 8247 h9 isapi测试

阿里云易立:云原生如何破解企业降本提效难题?

Draco - gltf model compression tool
随机推荐
哈希表及完整注释
Leetcode:minimum_depth_of_binary_tree解决问题的方法
Derivative, partial derivative, directional derivative
Halcon instance to opencvsharp (C openCV) implementation -- bottle mouth defect detection (with source code)
CDB PDB user rights management
用全连接+softmax对图片的feature进行分类
安全巡检的工作
[unity notes] screen coordinates to ugui coordinates
Read fast RCNN in one article
widerperson数据集转化为YOLO格式
服装企业部署MES管理系统的五个原因
MetaForce原力元宇宙佛萨奇2.0智能合约系统开发(源码部署)
leetcode:736. LISP syntax parsing [flowery + stack + status enumaotu + slots]
MySQL --- 常用函数 - 字符串函数
The so-called consumer Internet only matches and connects industry information, and does not change the industry itself
MySQL
Five reasons for clothing enterprises to deploy MES management system
Apifox,你的API接口文档卷成这样了吗?
postgresql之整體查詢大致過程
QPushButton-》函数精解