Redis is an open-source high-performance key-value pair database that adapts to the storage requirements of different scenarios by providing multiple key-value data types, and with many high-level interfaces that enable it to perform different roles such as caching, queuing systems, and so on.
The latest version of Redis is 3.2.1, which is downloaded from the official website and then unzipped and installed:
$ wget http://download.redis.io/releases/redis-3.2.1.tar.gz
$ tar xzf redis-3.2.1.tar.gz
$ CD redis-3.2.1
$ make
After the installation is successful, Redis is started, there are two ways to start, the first is to run Redis-server directly to start Redis, very simple, Redis server uses 6379 port by default. The second way to start is to start Redis with the Init script, which enables Redis to be started in a Linux system with the init script, enabling Redis to run automatically with the system, and it is recommended to run Redis in a production environment.
Stop Redis: Considering that Redis may be synchronizing the in-memory data to the hard disk, forcing the Redis process to terminate may result in data loss. The proper way to stop Redis should be to send the shutdown command to Redis by:
$ redis-cli SHUTDOWN
When Redis receives the shutdown command, it disconnects all client connections, then performs persistence based on the configuration and finally completes the exit.
Basic knowledge of Redis (i)