Redis is a distributed NoSQL Database System Oriented to "key/value" pairs of data types. It features high performance and persistent storage, and is suitable for high-concurrency application scenarios. Keys include strings, lists, hashes, sets, and sorted sets. atomic operations can be performed on these types ). The emergence of redis largely compensates for the shortage of keyvalue storage such as memcached, and can play a good complementary role in relational databases in some cases. It provides Python, Ruby, Erlang, PHP, and c # clients for ease of use.
This article is intended for the first time using Redis in linux. The main steps are as follows:
Log On with root privileges, switch to the/tmp directory www.2cto.com [plain] cd/tmp input command download redis: [html] wget http://redis.googlecode.com/files/redis-4.4.14.tar.gz unzip [plain] tar xvzf redis-4.4.14.tar.gz input command: [html] make test www.2cto.com does not contain tclsh8.5, and the command is as follows: [html] sudo apt-get install tcl8.5 sudo make install
Start redis: [plain] redis-server check if redis is working properly execute ping command: [plain] redis-cli ping [plain] PONG redis is working properly
You can also directly run the command: [html] redis-cli redis: 127.0.0.1: 6379> ping PONG www.2cto.com redis: 127.0.0.1: 6379> set testkey 1 OK redis: 127.0.0.1: 6379> get testkey "1" by Joseph ph_liu81