当前位置:网站首页>Redis6
Redis6
2022-07-26 18:24:00 【程程呀是小白】
Redis 6
目录

本文是本人以前笔记,如果说是在掘金上看到的话没错,还是本人程程呀 的个人主页 - 动态 - 掘金 只有这一个。如果有哪里不对的话欢迎各位大佬指出问题,本人是一个小白。
上一篇文章为:CSDN ,本篇是Redis。
如果是springboot的话请看springboot创建项目_程程呀是小白的博客-CSDN博客 ,这个是从头开始的还没有学完springboot,一起学习呀!!!!
一.Redis介绍
二.下载安装
下载epel仓库yum install epel-release -y
下载redis数据库yum install redis -y
启动redis服务systemctl start redis2.1Redis常见命令
systemctl status redis 查看服务状态systemctl stop redis 停止服务systemctl restart redis 重启服务ps -ef | grep redis 查看reids服务信息systemctl enable redis redis开机启动
2.2redis启动界面
1,yum install redis -- 安装redis数据库(-- yum安装方式的redsi配置文件在/etc/redis.conf)2,systemctl start redis.service --开启redis服务3,ps -ef | grep redis -- 查看redis是否开启4,修配置文件-修改密码# requirepass foobared 注释去掉 ,修改为 requirepass 123456 //修改密码
systemctl restart redis.service --重启/usr/local/bin/redis-cli进入操作Redis基础知识Redis默认有16个数据库,默认的是第0个。可以使用select进行切换数据库,DBSIZE 查看DB大小,keys * 查看所有的key,清除当前数据库 flushdb,清除全部数据库的内容flushall
2.3 Redis是单线程的
2.4 Redis为什么单线程还这么快?
误区1:高性能的服务器一定是多线程的?
误区2:多线程(CPU上下文会切换)一定比单线程效率高!
2.5 Redis-key基本命令
EXISTS name 判断当前key是否存在Keys * 查看所有Clear 清屏Del/unlink name删除指定数据Move name 1 移除当前keyEXPIRE name 10 设置key的过期时间,单位秒TTL name 查看当前key的剩余时间Type name查看当前key的一个类型
边栏推荐
- Volatile keyword of JVM memory model
- Configure the server environment
- 测试面试题集-UI自动化测试
- 博客维护记录之图片预览嵌入位置问题
- Image preview embedding location of blog maintenance record
- Unity farm 2 - planting system
- Data Lake -- concept, characteristics, architecture and case overview
- This article explains in detail the five benefits that MES system brings to enterprises, with application scenarios
- Briefly describe the 11 core functional modules of MES system
- 彻底关闭win10自动更新
猜你喜欢

2022 build enterprise level data governance system

“蔚来杯“2022牛客暑期多校训练营1

Pycharm加载conda创建pytorch虚拟环境报错,在conda命令行正常

Advantages of advanced anti DDoS IP in Hong Kong and which industries are suitable for use

AttributeError: ‘Upsample‘ object has no attribute ‘recompute_ scale_ factor‘

Vs2019 export import configuration

Usage scenarios for automated testing

ReentrantLock学习之---基础方法

如何保护电子商务网站免受网络攻击?

彻底关闭win10自动更新
随机推荐
Cuda11.2 corresponding pytorch installation
密码一致,总显示如下图
Reentrantlock learning - lock release process
Sre person in charge of station B personally describes the multi activity disaster recovery construction after the 713 accident | takintalks share
Conda+pytorch environment tutorial
香港高防IP优势及哪些行业适合使用
Several ways to view containers
Selenium+Web自动化框架的Case
This article explains in detail the five benefits that MES system brings to enterprises, with application scenarios
[yolov5] - detailed version of training your own dataset, nanny level learning, logging, hand-in-hand tutorial
Introduce the difference between @getmapping and @postmapping in detail
查看容器的几种方式
File depth monitoring strategy
After the exam on June 25, see how the new exam outline reviews PMP
cuda11.2对应pytorch安装
Wechat applet plug-in -- wxml to canvas (generate pictures)
洋葱集团携手OceanBase实现分布式升级,全球数据首次实现跨云融合
J1:Redis为什么这么快+基本结构
EN 1504-7混凝土结构保护和修理用产品钢筋防腐—CE认证
第九章 实用建模技术