1, first enter the directory to be installed, for example, I want to install Redis into the/usr/local/redis, then first into the/usr/local
Cd/usr/local
2. Then download the installation package and unzip
wget http://download.redis.io/releases/redis-3.0.2.tar.gz
TAR-XVF redis-3.0.2.tar.gz
MV redis-3.0.2 Redis
CD Redis
3. Compile and install
Make
Make install
4. Modify the configuration
VI redis.conf
Daemonize no//is running in the background, on no, yes Yes
Port 6379//ports default 6379
LogFile ""//log file address/var/log/redis.log
5. Start the service
redis-server/usr/local/redis/redis.conf//Specify configuration file mode to run
Test whether it started successfully
REDIS-CLI ping//Output Pong is successful
Close Service
REDIS-CLI shutdown
If the non-default port
Redis-cli-p Port shutdown
6. This redis password
Redis-cli
CONFIG SET Requirepass 123456
Then restart Reids
REDIS-CLI shutdown
Redis-server/usr/local/redis/redis.conf
Linux Under-Build and install Redis