当前位置:网站首页>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
边栏推荐
- JVM monitoring and diagnostic tools - command line
- Three updates to build applications for different types of devices | 2022 i/o key review
- QT console output in GUI applications- Console output in a Qt GUI app?
- c语言面试写一个函数在字符串N中查找第一次出现子串M的位置。
- HKUST & MsrA new research: on image to image conversion, fine tuning is all you need
- laravel 使用腾讯云 COS5全教程
- Experience of Niuke SQL
- How to solve sqlstate[hy000]: General error: 1364 field 'xxxxx' doesn't have a default value error
- Markdown displays pictures side by side
- Ideas of high concurrency and high traffic seckill scheme
猜你喜欢
蚂蚁庄园安全头盔 7.8蚂蚁庄园答案
What are the classic database questions in the interview?
CloudCompare-点对选取
Sequential storage of stacks
Ctfshow-- common posture
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]
JMeter function assistant - random value, random string, fixed value random extraction
Experience sharing of contribution of "management world"
JVM命令之- jmap:导出内存映像文件&内存使用情况
高并发大流量秒杀方案思路
随机推荐
3531. 哈夫曼树
【GNN】图解GNN: A gentle introduction(含视频)
Crudini profile editing tool
Dc-7 target
面试中有哪些经典的数据库问题?
A very good JVM interview question article (74 questions and answers)
测试开发基础,教你做一个完整功能的Web平台之环境准备
Check point: the core element for enterprises to deploy zero trust network (ztna)
C note 13
Ha Qu projection dark horse posture, only half a year to break through the 1000 yuan projector market!
「解析」FocalLoss 解决数据不平衡问题
Shared memory for interprocess communication
360 Zhiyu released 7.0 new products to create an exclusive "unified digital workspace" for the party, government and army, and central and state-owned enterprises
Niuke Xiaobai monthly race 52 E. sum logarithms in groups (two points & inclusion and exclusion)
安装mongodb数据库
Jmeter自带函数不够用?不如自己动手开发一个
JVM命令之 jstat:查看JVM統計信息
Vscode for code completion
693. 行程排序
c面试 加密程序:由键盘输入明文,通过加密程序转换成密文并输出到屏幕上。