当前位置:网站首页>Redis 新手入门
Redis 新手入门
2022-06-26 09:32:00 【郭宝】
什么是Redis ?
Redis是REmote DIctionary Server 的简称,它是一个由 Salvatore Sanfilippo 写的 key-value 存储系统,是跨平台的非关系型数据库。
Redis 是一个开源的使用 ANSI C 语言编写、遵守的BSD协议、支持网络、可基于内存、分布式、可选持久性的键值对(Key-Value)存储数据库,并提供多种语言的API。
Redis 通常被称之为数据结构服务器,因为值(value)可以是字符串(String)、哈希(Hash)、列表(list)、集合(sets)和有序集合(sorted sets)等类型。
为什么要使用Redis ?
因为Redis是开源的,遵守BSD协议,是一个高性能的 kay-value 数据库。Redis 与其它 key-value 缓存产品有以下三个特点:
- Redis 支持数据库的持久化,可以将内存中的数据存储到磁盘中,重启的时候可以再次加载进行使用
- Redis 不仅仅支持简单的 key-value 类型的数据,同时还提供 list 、set、zset、hash等数据结构的存储。
- Redis 支持数据的备份,即master-slave 模式的数据备份
怎么使用Redis ?
Window平台下Redis 的下载和安装
1、Window版下载Redis
下载地址:Releases · microsoftarchive/redis · GitHub
进入网站后,直接点击 Redis-x64-3.0.504.msi 下载安装版

2、Window版安装Redis
双击 Redis-x64-3.0.504.msi 文件进行安装

然后一路点击下一步即可安装成功
3、Window版配置Redis
安装完成以后,打开Redis的安装目录,然后再此处右键,打开dos命令行

然后输入以下命令启动Redis服务
redis-server.exe redis.windows.conf
然后可以进入服务界面,查询Redis服务是否已开启

Window平台下Redis 的使用
1、首先进入到Redis的安装目录,然后打开命令行,输入如下代码连接Redis数据库
redis-cli.exe -h 127.0.0.1 -p 63792、然后设置键值对
set 表示设值的关键字
其中 gb 表示键(key)
guobao 表示 gb 键对应的值
set gb guobao3、根据键获取值
get 表示获取的关键字
gb 表示键(key)
get gb效果图:

边栏推荐
- Curriculum learning (CL)
- 2021年全国职业院校技能大赛(中职组)网络安全竞赛试题(1)详细解析教程
- [open source] use phenocv weedcam for more intelligent and accurate weed management
- 2021-11-22 运动规划杂记
- "One week to finish the model electricity" - 55 timer
- Self taught neural network series - 9 convolutional neural network CNN
- 挖财打新债安全吗
- Merrill Lynch data technology expert team | building a cloud native product system based on containers
- Statistics of various target quantities of annotations (XML annotation format)
- 2021-11-12 vrep视觉传感器配置
猜你喜欢
![Pycharm [debug] process stuck](/img/8c/c32cbdfcb106b34fccbbc071a13822.jpg)
Pycharm [debug] process stuck

jz2440---使用uboot烧录程序

【CVPR 2021】Joint Generative and Contrastive Learning for Unsupervised Person Re-identification

Adding confidence threshold for demo visualization in detectron2

"One week to solve the model electricity" - negative feedback

常用电路设计

xsync同步脚本的创建及使用(以Debian10集群为例)

Super data processing operator helps you finish data processing quickly

Badge series 8: generate a personalized Badge

How to solve the problem that NVIDIA model cannot be viewed by inputting NVIDIA SMI and quickly view NVIDIA model information of computer graphics card
随机推荐
Nacos registry structure and the principle of massive service registration and concurrent read-write source code analysis
The shutter tabbar listener is called twice
There is a strong demand for enterprise level data integration services. How to find a breakthrough for optimization?
OpenCV depthframe -> pointcloud 导致 segmentation fault!
The first techo day Tencent technology open day, 628
十万行事务锁,开了眼界了。
Badge series 7: use of codacy
Practice of production control | dilemma on assembly rack
2021-11-22 运动规划杂记
thinkphp5使用composer安装插件提示php版本过高
Catalogue gradué de revues scientifiques et technologiques de haute qualité dans le domaine de l'informatique
欧冠比赛数据集(梅西不哭-离开巴萨也可能再创巅峰)
The first problem troubleshooting process of re disk
"One week's work on digital power" -- encoder and decoder
2021-11-12 vrep视觉传感器配置
xsync同步脚本的创建及使用(以Debian10集群为例)
pcl install
Yolov5 results Txt visualization
CVPR:Refining Pseudo Labels with Clustering Consensus over Generations for Unsupervised Object Re-ID
Detectron2 outputs validation loss during training