当前位置:网站首页>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效果图:

边栏推荐
- Flutter's brain map notes are easy to find and search!
- Common circuit design
- Param in the paper
- The first problem troubleshooting process of re disk
- QPM performance monitoring components - General
- Kubernetes cluster deployment (v1.23.5)
- Behavior tree file description
- Execution process at runtime
- "One week's work on Analog Electronics" - integrated operational amplifier
- 2021-11-22 运动规划杂记
猜你喜欢

Curriculum learning (CL)

Error importerror: numpy core. multiarray failed to import

【CVPR 2021】 Lifelong Person Re-Identification via Adaptive Knowledge Accumulation

"One week's work on Analog Electronics" - Basic amplification circuit

"One week's work on Analog Electronics" - optocoupler and other components

0 basic how to make a cool leadership cockpit?

2021年全国职业院校技能大赛(中职组)网络安全竞赛试题(1)详细解析教程

Merrill Lynch data tempoai is new!

《單片機原理及應用》——概述

Understanding of swing transformer
随机推荐
"One week to finish the model electricity" - 55 timer
《一周搞定模电》—集成运算放大器
MySQL单表500万条数据增、删、改、查速度测试
Thinking before QPM preparation optimization
CVPR:Refining Pseudo Labels with Clustering Consensus over Generations for Unsupervised Object Re-ID
Self taught neural network series - 9 convolutional neural network CNN
Behavior tree file description
Merrill Lynch data technology expert team | application of recommendation of relevant contents in group system data retrieval
异常记录-23
Modify coco evaluation index maxdets=[10,15,20]
Merrill Lynch data technology expert team | building a cloud native product system based on containers
3大问题!Redis缓存异常及处理方案总结
PHP extracts TXT text to store the domain name in JSON data
How to compile builds
"One week's solution to analog electricity" - power circuit
Nacos registry structure and the principle of massive service registration and concurrent read-write source code analysis
Understanding of swing transformer
《一周搞定模电》—基本放大电路
Principe et application du micro - ordinateur à puce unique - Aperçu
Origin of QPM