当前位置:网站首页>Redis learning notes (continuously updating)
Redis learning notes (continuously updating)
2022-06-11 02:16:00 【Java Xiaohao】
Redis
One 、Redis Installation and overview
1.1、 summary
Redis What is it? ?
Redis(Remote Dictionary Server ), Remote dictionary service ,
Redis It's an open source key-value The storage system , The hottest thing right now NoSQL One of the technologies .
1.2、 install
1. hold redis-6.2.6.tar.gz Upload to /opt Folder
2. Check to see if there is gcc Compile environment gcc --version
If not, install yum install gcc
3. decompression redis-6.2.6.tar.gz file tar -zxvf redis-6.2.6.tar.gz
After decompression, go to redis-6.2.6 Folder cd redis-6.2.6
Input does not contain parameters make Command to compile make
install redis make install
1.3 Check the installation directory
1.3.1、 The default directory :/usr/local
1.redis-benchmark: Performance testing tools , You can run it in your own notebook to see how it performs
2.redis-check-aof: Recover the problem AOF file
3.redis-check-dump: Recover the problem dump.rdb file
4.redis-sentinel:Redis Cluster use
5.redis-server:Redis Server start command
6.redis-cli: client , Operation entrance
1.3.2、 Background start Redis
1、 Get into /opt, View directory , hold redis.conf Copied to the /etc The file named redis.conf
2、 Background settings daemonize no Change to yes
3、redis start-up Start command :redis-server /etc/redis.conf
4、 View server processes :ps -ef | grep redis
5、 Through the client link Redis command :redis-cli
6、 close Redis:
- shutdown
- exit
- kill -9 3837
1.3.3、 Test performance
redis-benchmark It's a stress testing tool !
redis-benchmark Command parameter
redis-benchmark [option] [option value]

Just test it :
# test :100 Two concurrent connections 100000 A request
redis-benchmark -h localhost -p 6379 -c 100 -n 100000
Two 、Redis key (key)
- keys * : View all in the current library key
- set key value : Add... To the current library key and value
- exists key : Judge a certain key Whether there is
- type key : View specified key Data type of
- del key : Delete specified key data
- unlink key: according to value Select non blocking delete
Tight grip keys from keyspace Delete from metadata , The real deletion will occur in the subsequent asynchronous operations
- expire key 10:10 Seconds is key Set expiration time
- MOVE key db Will be the current database of key Move to a given database db among .
- move name 1 Remove the current key
- PERSIST key remove key The expiration time of ,key Will last .
- RANDOMKEY Returns a random... From the current database key .
- RENAME key newkey modify key The name of
- TYPE key return key The type of value stored .
- ttl key See how many seconds are left to expire ,-1 Never expire ,-2 Indicates that it has expired
- select Command switch database
- dbsize: Check the... Of the current database key The number of
- flushdb: Empty the current library
- flushall: Kill all the warehouses
边栏推荐
- cannot import name ‘dtensor‘ from ‘tensorflow.compat.v2.experimental‘
- Using an old mobile phone to build a server and achieve intranet penetration does not require root (I have personally tested the simplest one many times)
- Analysis of the difficulties in the architecture design of massive chat messages in the live broadcast room
- 贵金属白银和现货白银之间是什么关系
- [matlab] basic operation of MATLAB image processing
- Day code 300 lines learning notes day 22
- ASEMI场效应管12N65参数,12N65规格书,12N65特征
- Secret
- Rewrite: kms activates office2016, 2019 and 2021 with error code: 0xc004f069
- [3.delphi common components] 5 List class component
猜你喜欢

Method of using dism command to backup driver in win11 system

技术分享| 快对讲,全球对讲

CRS-4544 & ORA-09925

Understanding of pointers
![[music] playing](/img/cf/63b04080867e93ab2e00e2e21b37df.jpg)
[music] playing "over fire" based on MATLAB [including Matlab source code 1875]

14:00面试,14:08就出来了 ,问的实在是太...

Project sorting of Online Exercise System Based on gin and Gorm
![[penetration test tool bee] how to install and use the XSS penetration test tool bee?](/img/c4/7fbb0bff07b548af81165b22002661.jpg)
[penetration test tool bee] how to install and use the XSS penetration test tool bee?

Oracle收集统计信息

双面材质【double sided】的Shader
随机推荐
NFT Insider #61:Animoca Brands 在 340 项投资中持有 15 亿美元的加密资产
从测试零基础到测试架构师,这10年,他是这样让自己成才的
Binary tree sequence traversal
Rewrite: kms activates office2016, 2019 and 2021 with error code: 0xc004f069
(solved) latex -- cancel the superscript display of references in the text (gbt7714-2015 will lead to the default superscript reference) (tutorial on mixed use of superscript and flush)
SAP smartforms page feed printing automatic judgment
Task03: building an offline material system
大厂测试员年薪30万到月薪8K,吐槽工资太低,反被网友群嘲?
[QT] error: qapplication: no such file or directory solution
[traffic sign recognition] Based on Matlab GUI YCbCr feature extraction +bp neural network traffic sign recognition [including Matlab source code 1869]
Fb02 edit coding block field
[matlab] image enhancement (power transformation, histogram specification processing method, smoothing and sharpening filtering)
优化调度(火电、风能、储能)【matlab代码实现】
Implementing stack with queue
接口自动化核心知识点浓缩,为面试加分
JS basic part hand exercises
[matlab] image restoration
腾讯测试开发岗面试上机编程题
cannot import name ‘dtensor‘ from ‘tensorflow.compat.v2.experimental‘
20n10-asemi medium and small power MOS transistor 20n10