Objective
Redis is currently recognized as the fastest memory based on the key value of the database, but Redis's shortcomings are also very obvious, only provide the most basic hash set, list, sorted set, etc. based on data types, no table, no schema, no index, no foreign keys, lack of int/ Date and other basic data types, multi-condition query needs to be implemented indirectly through set inline (sinter,zinterstore) and connection, inconvenient operation, low development efficiency and poor maintainability; therefore, it is generally not used as a complete database alone, Many web sites use Redis as a cache and session state storage layer, which is then used in combination with other databases.
Note: This article is installed in version 3.0.6, you can download the latest stable version to Https://redis.io/download
Method One
$ wget http://download.redis.io/releases/redis-3.0.6.tar.gz
$ tar xzf redis-3.0.6.tar.gz
$ cd redis-3.0.6
$ make
$ cd src
After make, the redis-3.0.6/src
redis-server
service program and the client program appear in the directory redis-cli
. will be redis-3.0.6/redis.conf
copied to the SRC directory
Start the Redis service side
./redis-server redis.conf
Open another terminal at this time, start the client
Test run
127.0.0.1:6379> set name Tom
OK
127.0.0.1:6379> get name
"Tom"
The installation was successful.
Method Two
Install online using the following command
$sudo apt-get Update
$sudo apt-get install Redis-server
Start Redis server and client separately
$ redis-server
$ redis-cli
Summarize
The above is the entire content of this article, I hope the content of this article for everyone's study or work can bring certain help, if you have questions you can message exchange.