Operating on Linux: REDIS-CLI link redis-cli-a password
You can also enter the password individually: 127.0.0.1:6379>auth d3bcc7a988ad2d652276bca0ad8141a5
To view an existing key value pair: 127.0.0.1:6379> keys *
Configure master-Slave
Redis download Address, agreed version number The last even-numbered stable version, the odd is an unstable version, I download here is the redis-4.0.8 version of the/usr/local under the new Redis directory, will download the Redis compression
After we install the Redis service, then we look at the basic configuration.
Redis configuration file default location/etc/redis.conf:
Egrep-v "(^#|^$)"/etc/redis.conf
Enter the Redis command line:
Redis-cli
Where 6379 is the listening
Website address: http://redis.io/
Official website Download Address: http://redis.io/download
1. Download the Redis source code (tar.gz) and upload it to Linux
2. Unpacking package: Tar zxvf redis-2.8.17.tar.gz
3. Enter the extracted folder: CD
5 usage Scenarios for Redis
Redis is a powerful storage of memory data structures, including databases, caches, and message brokers for a variety of purposes. Most people often think of it as just a simple key-value store, but in fact it has more
In addition to being used as cache data, Redis can also do these
Redis should be one of the most popular NoSQL databases at the moment. Redis is typically used as a cache component for caching data. However, in addition to caching data, there are
Redis uses its own implementation of the event separator, high efficiency, the internal use of non-blocking execution mode, throughput capacity is relatively large.
However, because the general memory operation is simple access operation, the
Reference article: https://blog.csdn.net/fgf00/article/details/52917154
I. Introduction of RedisRedis is a key-value storage system. Similar to memcached, it supports storing more value types, including string (string), list (linked list), set (set),
Redis zrevrank Command
Redis ordered set (sorted set)
The Redis zrevrank command returns the rank of the member in the ordered set. Where ordered set members are sorted by fractional values descending (from large to small).
The ranking is based
The key in the Redis key-value pair is of type string. What does the Redis internal implementation do with string? The Redis bottom is written in C, for STIRNG does not directly use the C character array, but instead encapsulates a type of SDS. The
Redis persistence mechanism
Redis is an in-memory database that supports persistence, which means that Redis often needs to synchronize the in-memory data to the hard disk to persist.
Redis persistence two ways RDB and AOF
1.snapshotting
Reason: Related to the database configuration parameters of the Yii Redis
Array (
"Framework.vendors.yiiredis.ARedisConnection",
"127.0.0.1",
= 6379,
= 0,
"",
"", "
)
Under Redis, a database is identified by an integer
Redis External Access configuration (BIND is configured correctly) after Redis is deployed, it is found that external access to Redis is not available. Maybe you've looked at me the same night. Many posts, most of which are similar, are set up in
1, the introduction of RedisRedis Open Source memory database, storing data in key-value way; Redis features: 1), Redis data is completely stored in memory, using disk only to persist data, solve the problem of data loss caused by restarting the
The project used here is still the Springboot support for non-relational database NoSQL, except that the difference between Redis server redistemplete and Stringredistemplete on a remote server is used here
In this article we have also tried
1, decompression: TAR-ZXVF redis-3.0.0.tar.gz2, LL3. CD redis-3.0.0Must have makefile at compile time4. Make
[Root@localhost redis-3.0.0]# make
cd src && do all
make[1]: Enter directory "/USR/JAVA/REDIS-3.0.0/SRC"
CC ADLIST.O in
file included
Hset key field value
Function: Set the value of the filed field in the key to value
Note: If there is no field field, add directly, if any, overwrite the value of the original Field field
Hmset key field1 value1 [field2 value2 field3 value3 ...
Jeesz is a distributed framework that provides modular, service-based, hot-swappable ideas for project-based Java EE Rapid development platforms with high package security.Jeesz itself integrates Dubbo service control, zookeeper Registration Center,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service