当前位置:网站首页>Redis is installed on Linux
Redis is installed on Linux
2022-07-29 01:29:00 【Blue code man】
Redis What is it? ( free , Open source )
Redis Full name Remote Dictionary Server( Remote dictionary service ), It is a key value type non relation based on memory implementation (NoSQL) database , By the Italians Salvatore Sanfilippo Use C Language writing .
--- It's the hottest nosql One of characteristic
1 A variety of data types
2 Persistence
3 colony
4 thing
NOsql What is it?
NoSQL(Not Only SQL), namely Not only is SQL, Generally speaking Non relational database .
NoSQL Easy to expand ,NoSQL There are many kinds of databases (MongoDB、Redis etc. ), The common feature is to remove the relational characteristics of relational databases .
There is no relationship between the data , This makes it very easy to expand , Invisibly, it also brings scalable capabilities at the architecture level .
Big data NoSQL The database has very high read-write performance , It's because it's irrelevant , The structure of the database is simple .
NoSQL A typical example of a database is Redis.
Redis stay linux The installation of the
yum install gcc-c++
-------------------------------
Prepare the environment in advance gcc because Redis yes c++ Written , Virtual machines cannot be used without a network yum Installed download Redis
Redis Official website :
Upload it to your server or virtual machine and decompress it
It is recommended to upload directly to opt below , Usually installed here
tar -zvxf The version you downloaded compile ( Heard of gcc Environment compilation redis)
makeinstall
You can skip this step, but it is recommended to , Equivalent to the win The shortcut above , The default path is usr/local/bin below
make installThe configuration file
Redis It's through redis.conf To turn on the service , So you can copy multiple configuration files , Keep the original configuration file , Create a directory through which to start redis, Also is to redis.cinf Copy one to operate .
Generally, it is modification daemonize, however 6 It seems to be enabled by default, so there is no need to modify .
yes It's Jean redis Start the service in the background ,no Is to open the service
| Configuration item name | Configuration item value range | explain |
|---|---|---|
| daemonize | yes、no | yes Indicates that the daemon is enabled , The default is no That is, it does not run as a daemon . among Windows Running in daemon mode is not supported under the system |
| port | Appoint Redis Listening port , The default port is 6379 | |
| bind | The bound host address , If you need to set remote access, you can directly put this property under the comment or change it to bind * that will do , This property is the same as the following protected-mode Controls whether remote access is possible . | |
| protected-mode | yes 、no | Protected mode , This mode controls whether the external network can be connected redis service , The default is yes, Therefore, by default, our external network is inaccessible , If you need an Internet connection rendis The service needs to change this attribute to no. |
| timeout | 300 | Close the connection after how long the client is idle , If specified as 0, Indicates that the feature is turned off |
| loglevel | debug、verbose、notice、warning | The level of logging , The default is notice |
| databases | 16 | Set the number of databases , The default database is 0. The whole can be seen through the client tool |
| rdbcompression | yes、no | Specifies whether data is compressed when stored to a local database , The default is yes,Redis use LZF Compress , If in order to save money CPU Time , This option can be turned off , But it can make the database files huge . |
| dbfilename | dump.rdb | Specifies the local database file name , The default value is dump.rdb |
| dir | Specifies the local database hosting directory | |
| requirepass | Set up Redis Connect the password , If the connection password is configured , The client is connecting Redis Need to go through AUTH <password> Command provide password , Off by default | |
| maxclients | 0 | Sets the maximum number of client connections at one time , Default limit ,Redis The number of client connections that can be opened simultaneously is Redis The maximum number of file descriptors that a process can open , If you set maxclients 0, No restrictions . When the number of client connections reaches the limit ,Redis The new connection is closed and returned to the client max number of clients reached error message . |
| maxmemory | XXX <bytes> | Appoint Redis Maximum memory limit ,Redis Data is loaded into memory at startup , After reaching the maximum memory ,Redis It will first try to clear those that are due or are about to expire Key, When this method is handled after , Still reaches the maximum memory setting , Will no longer be able to write , But you can still do a read .Redis new vm Mechanism , Will be able to Key Storage memory ,Value Will be stored in a swap District . Configuration item value range column XXX Is the value . |
Start the service
redis-server /redis.conf Address, such as me redis.conf stay qwe Next I will
redis-server qwe/redis.conf
such redis The installation is successful
Use find redis-cli Under the table of contents
redis-cliLocal connection redis A command of the service , After this command, you can enter redis Script console .
redis-cli -p 6379 Open the success
Input ping
Output PONG
It can be used normally.
边栏推荐
- Django使用MySQL数据库已经存在的数据表方法
- SQL question brushing: find the current salary details and department number Dept_ no
- [ManageEngine] what is the LAN monitoring software and what is its function
- C language bracket matching (stack bracket matching C language)
- els 方块移动
- Digital twin rail transit: "intelligent" monitoring to clear the pain points of urban operation
- Introduction to FLV documents
- Google Play APK 上传其他国际应用商店
- 了解网址url的组成后 运用url模块、querystring模块和mime模块完善静态网站
- Self-attention neural architecture search for semantic image segmentation
猜你喜欢

Connect with Alipay payment

Seven SQL performance optimizations that spark 3.0 must know
![A ten thousand word blog post takes you into the pit. Reptiles are a dead end [ten thousand word pictures]](/img/aa/a5e7b4516aa395f8d4d0e2eee7d3c7.png)
A ten thousand word blog post takes you into the pit. Reptiles are a dead end [ten thousand word pictures]

Docker-compose安装mysql

括号匹配的检验

Principle and usage setting of large page memory

北京护照西班牙语翻译推荐

Docker compose install MySQL

Visual full link log tracking

This article enables you to understand the underlying principle of MySQL- Internal structure, index, lock, cluster
随机推荐
mysql 创建索引的三种方式
vm options、program arguments、environment property
Date conversion EEE MMM DD hh:mm:ss zzz YYYY
Visual full link log tracking
RHCE命令练习(二)
Interviewer: programmer, please tell me who leaked the company interview questions to you?
[leetcode sliding window problem]
PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益
vm options、program arguments、environment property
北京护照西班牙语翻译推荐
第二轮Okaleido Tiger热卖的背后,是背后生态机构战略支持
els 新的方块落下
Hilbert transform and instantaneous frequency
Closures and decorators
PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益
Regular checksum time formatting
Oozie工作调度
Self-attention neural architecture search for semantic image segmentation
Groundwater, soil, geology and environment
【Leetcode-滑动窗口问题】
https://redis.io/