The installation is relatively simple, and it is posted to facilitate future operations.
Redis is one of the more popular NOSQL systems, it is a key-value storage system. Similar to Memcached, but largely compensates for the shortcomings of memcached, it supports relatively more value types to be stored, including string, list, set, zset and hash. These data types all support push/pop, add/remove, intersection union and difference, and richer operations. On this basis, redis supports sorting in various ways. Redis data is cached in computer memory, and will periodically write updated data to disk or write modification operations to additional log files.
Redis official website address
Latest version: 2.8.3
Installing Redis under Linux is very simple. The specific steps are as follows (the official website has instructions):
1. Download the source code, decompress it and compile the source code.
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
2. After the compilation is completed, there are four executable files redis-server, redis-benchmark, redis-cli and redis.conf in the Src directory. Then copy to a directory.
mkdir /usr/redis
cp redis-server /usr/redis
cp redis-benchmark /usr/redis
cp redis-cli /usr/redis
cp redis.conf /usr/redis
cd /usr/redis
3. Start the Redis service.
$ redis-server redis.conf
or
#Add `&` to make redis run as a background program
./redis-server &
#Check if the background process exists
ps -ef | grep redis
#Check if port 6379 is listening
netstat -lntp | grep 6379
4. Then use the client to test whether the startup is successful.
$ redis-cli
redis> set foo bar
OK
redis> get foo
"bar"