1. Introduction to redis:
The advantages of redis as a cache:
1. Memory-level cache, the query speed is beyond doubt.
2. High-performance KV storage system, supports String, Hash, List, Set, Sorted Set and other data types, which can be applied in many scenarios.
3. Redis version 3.0 and above supports cluster deployment.
4. Redis supports data persistence, AOF, RDB methods.
Most of the time, we call redis an in-memory database, which stores key-value pair information in memory during operation, and writes it to the local database asynchronously in the background (default: dump.rdb, Configure in redis.conf. If you need to consider the security persistence requirements, you need to turn on the AOF function. For details, you can check this article: redis persistence), the key stored in redis can be of any type, and will eventually be stored as byte[] Type; there are many types of value: string, list, set, sortedset, hash, which can basically meet the key-value storage requirements in development; in addition, redis also supports transactions, message systems and other functions, and provides various client-side APIs such as Java, Python, Shell, etc.
2. To install redis on the Linux server,
first attach the official website to download and install the basic tutorial: https://redis.io/download The
first step is to download and decompress
cd /root/redis/
wget http://download.redis.io/releases/redis -3.2.8.tar.gz
decompression
tar xvzf redis-3.2.8.tar.gz -C /usr/local/src/ The
second step is to compile and install
make
make all
make install
The third step
to create a folder
mkdir /root/redis/bin
will be /root/redis/redis -3.2.8 Copy the executable file under the/src file to the created folder
redis-benchmark redis-check-aof redis-check-dump redis-cli redis-sentinel redis-server
cp /root/redis/redis-3.2. 8/sr-* /root/redis/bin
Copy the redis.conf of the decompressed file in the /root/redis/redis-3.2.8/src directory to /usr/redis
cp /usr/local/src/redis- 3.2.8/redis.conf /root/redis/bin
Step 4 Install tlc
for details: http://blog.csdn.net/luyee2010/article/details/18766911
redis-server directory/redis.conf can be started
Redis installation and client connection implementation (non-cluster environment construction)
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326310340&siteId=291194637
Recommended
Ranking