当前位置:网站首页>Redis (I) -- getting to know redis for the first time
Redis (I) -- getting to know redis for the first time
2022-07-07 06:24:00 【yutao_ five hundred and seventeen】
brief introduction
Redis It's based on key value pairs (key-value) Of NoSQL database
SQL and NoSQL difference
| SQL | NoSQL | |
|---|---|---|
| data structure | structured | Unstructured |
| Data Association | The associated | Unrelated |
| A query | SQL Inquire about | Not SQL |
| Transaction features | ACID | No transaction ( Cannot satisfy strong consistency ) |
| storage | disk | Memory |
| Extensibility | vertical | level |
| Use scenarios | The data structure is fixed ; Relevant businesses have high data consistency and security | The data structure is not fixed ; The data consistency and security of related businesses are not high ; Performance requirements |
Redis characteristic
- Data structure server based on key value pairs ,value Support a variety of different data structures , Rich in functions
- Single thread . Each command is consistent
- Low latency , Fast ( Memory based 、IO Multiplexing 、 Good coding )
- Support data persistence
- Support the master-slave cluster , Fragmentation cluster
- Support for multilingual clients
install
Default startup mode
yum install gcc tcl -y
wget https://download.redis.io/releases/redis-6.2.7.tar.gz
mv redis-6.2.7.tar.gz /usr/local/src/
tar -zxvf redis-6.2.7.tar.gz
cd redis-6.2.7
make && make install
redis-server

Background startup mode
cp redis.conf redis.conf.default
vim redis.conf
# Modify the following configuration
bind 0.0.0.0
daemonize yes
# Daemon , It is amended as follows yes Background start
requirepass 123456
# Set up redis Access code for
redis-server /usr/local/src/redis-6.2.7/redis.conf
ps -ef|grep redis

Write service startup
vim /etc/systemd/system/redis.service
[Unit]
Description=redis-server
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/bin/redis-server /usr/local/src/redis-6.2.7/redis.conf
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Then reload the system services
systemctl daemon-reload
Now? , We can use the following set of commands to operate redis 了 :
# start-up
systemctl start redis
# stop it
systemctl stop redis
# restart
systemctl restart redis
# Check the status
systemctl status redis
Execute the following command , It can make redis Boot from boot :
systemctl enable redis
redis-cli -h 127.0.0.1 -p 6379 -a 123456

边栏推荐
- 开发者别错过!飞桨黑客马拉松第三期链桨赛道报名开启
- Experience of Niuke SQL
- Check point: the core element for enterprises to deploy zero trust network (ztna)
- 蚂蚁庄园安全头盔 7.8蚂蚁庄园答案
- [FPGA] EEPROM based on I2C
- Handling hardfault in RT thread
- [FPGA tutorial case 14] design and implementation of FIR filter based on vivado core
- Test the foundation of development, and teach you to prepare for a fully functional web platform environment
- 「解析」FocalLoss 解决数据不平衡问题
- 生活中的开销,怎么记账合适
猜你喜欢

jvm命令之 jcmd:多功能命令行

tkinter窗口选择pcd文件并显示点云(open3d)

Jstack of JVM command: print thread snapshots in JVM

Laravel uses Tencent cloud cos5 full tutorial

3428. Put apples

string(讲解)

Ha Qu projection dark horse posture, only half a year to break through the 1000 yuan projector market!

Common problems of caching in high concurrency scenarios

JVM命令之- jmap:导出内存映像文件&内存使用情况

Ctfshow-- common posture
随机推荐
Party A's requirements for those who have lost 800 yuan
Bypass open_ basedir
693. Travel sequencing
Check point: the core element for enterprises to deploy zero trust network (ztna)
安装VMmare时候提示hyper-v / device defender 侧通道安全性
ICML 2022 | explore the best architecture and training method of language model
Career experience feedback to novice programmers
Test the foundation of development, and teach you to prepare for a fully functional web platform environment
A very good JVM interview question article (74 questions and answers)
Apple CMS V10 template /mxone Pro adaptive film and television website template
Calculation model FPS
面试中有哪些经典的数据库问题?
When we talk about immutable infrastructure, what are we talking about
A freshman's summary of an ordinary student [I don't know whether we are stupid or crazy, but I know to run forward all the way]
@Detailed differences between pathvariable and @requestparam
Markdown 并排显示图片
Vscode for code completion
字符串常量与字符串对象分配内存时的区别
Markdown displays pictures side by side
[FPGA tutorial case 13] design and implementation of CIC filter based on vivado core