当前位置:网站首页>Redis的安装及启动
Redis的安装及启动
2022-06-25 22:42:00 【软件测试小小白】
一、redis简介:
概念:Redis 是 一个开源的(免费的)高性能的 key-value (一个名称对应一个值,比如一个姓名对应一个人) 的 数据库。reids诞生于2009年。
Redis应用场景:热点数据(微博热搜,热点新闻),计数(点赞数统计,点击数统计),消息队列(商品秒杀,抢购),排行榜, 购物车,抽奖,用户推荐等
Redis特点:
1、高性能
2、支持多数据结构
字符串 string
列表 list
哈希 hash
集合 set
可排序集合 sorted_set
3、数据持久化,可以进行数据恢复
二、Redis的下载和安装(linux)
1、官网 https://redis.io/ 下载对应的版本,用xftp上传到linux上
2、通过wget下载:
http://download.redis.io/releases/,选择版本右击复制链接
3、到服务器上输入命令:
wget
http://download.redis.io/releases/redis-6.0.0.tar.gz
4、解压缩:tar -zxvf redis-6.0.0.tar.gz
5、进入redis目录,执行编译:make ( 若报错:gcc:not found ,则需要安装gcc,执行:yum -y install gcc )
6、redis目录下执行:make install (将命令添加到环境变量/usr/local/bin中)
三、Redis启动和关闭
启动:
1、前台启动:redis-server
2、后台启动:redis-server & (推荐)
3、指定配置文件启动redis服务:
redis-server redis.conf &
关闭:
1、kill命令杀掉进程
2、redis-cli shutdown
四、Redis客户端
redis-cli是Redis自带的客户端程序,通过网络连接到Redis服务器,实现和Redis服务器的交互。我们使用客户端来执行redis的命令。
1、启动命令:redis-cli (默认连接127.0.0.1,端口号6379的redis服务)
2、指定端口启动命令:redis-cli -p 端口号
3、指定ip地址指定端口号的启动命令:redis-cli -h ip地址 -p 端口号
4、退出客户端:exit
进入客户端后则可使用命令进行redis操作。
福利
边栏推荐
- [OEM special event] in the summer of "core cleaning", there are prize papers
- 4 key points to help the product manage the project well
- Atlas200dk刷机
- Why do we need to make panels and edges in PCB production
- Redux workflow + complete code of small examples
- Idea set the template of mapper mapping file
- 86. (cesium chapter) cesium overlay surface receiving shadow effect (gltf model)
- "Method not allowed", 405 problem analysis and solution
- 从进程的角度来解释 输入URL后浏览器会发生什么?
- 实现异步的方法
猜你喜欢
Atlas200dk brush machine
1-10Vmware构建自定义的网络架构
Xiaohongshu microservice framework and governance and other cloud native business architecture evolution cases
How to design the product roadmap?
Installation and configuration of gradle environment
How product managers control the progress of product development
Display unassigned virtual address after easyconnect connection
SSL unresponsive in postman test
机器视觉:照亮“智”造新“视”界
Openresty chapter 01 introduction and installation configuration
随机推荐
【TSP问题】基于Hopfield神经网络求解旅行商问题附Matlab代码
Function and principle of SPI solder paste inspection machine
Things / phenomena / things / things / situations / appearances
渗透工具-Burpsuite
Summary of common terms and knowledge in SMT chip processing industry
Cloud rendering and Intel jointly create the "core" era of cloud rendering
Blob
2021-04-28
元宇宙中的法律与自我监管
Redux workflow explanation + small examples
Binary sort tree
Permission design = function permission + Data permission
从进程的角度来解释 输入URL后浏览器会发生什么?
"Seamless" deployment of paddlenlp model based on openvinotm development kit
原型和原型链的理解
Should group by be used whenever aggregate functions are used in SQL?
Megacli common command collation
No executorfactory found to execute the application
Leetcode 513. Find the value in the lower left corner of the tree
Performance leads the cloud native database market! Intel and Tencent jointly build cloud technology ecology