Download
cd/usr/local/src/
wget http://download.redis.io/releases/redis-2.8.17.tar.gz
Extract
TAR-ZXVF redis-2.8.17.tar.gz
Install the compilation component
Yum Install build-essential
Switch to the redis-2.8.17 directory, compile
Make
(Output hint:it ' s a good idea-to-run ' make test ';) ) indicates success
Go to Catalog
/home/redis/redis-2.8.17/src
The following new files will be generated under this directory
Redis-benchmark (Redis Performance test tool)
Redis-check-aof
Redis-check-dump
REDIS-CLI (Redis command Line Operations tool)
Redis-sentinel
Redis-server (daemon boot program for Redis server)
Start./redis-server
Test:./redis-cli
The default port to start is 6397
After installing Redis, when importing Redis through a Python program, encountered a "Importerror:no module named Redis" Error, the online check the following reasons, the solution is as follows:
Python does not support Redis by default, and when you reference Redis, you get an error:
You need to install the Redis library for python, download https://github.com/andymccurdy/redis-py, unzip and install
You can also install the Git tool
Apt-get install-y git
git clone https://github.com/andymccurdy/redis-py
Switch to the Redis-py directory and locate the setup.py
Execute python setup.py Install
Enter the Python editor to import Redis as normal
Installing Redis, and how Python references Redis