Redis Basics -linux installation

redis is that we currently use a lot of middleware, today to learn about it.
First we need to install redis, download URL: https: //redis.io/download
 
Next we need to install some gcc
yum install gcc
 
We will redis downloaded files into usr / local following, you can use rz command, see the error: https: //www.cnblogs.com/xiaosisong/p/12408509.html
 
Decompressing after a successful upload Redis
 

redis-5.0.7.tar.gz tar xzf after decompression, enter the file cd redis-5.0.7

Compile and run make install
# Enable and specify the configuration file
src / redis-server redis.conf (note that you want to use into the background, so modify redis.conf in the daemonize changed to yes)

This is not the time to start redis found when it will complain? -bash: redis-server: command not found

Dug a hole right here, must only be performing make install.

After executing the install then execute redis-server can be started.

 

 redis redis a startup logo will appear, but with the closure of this linux, redis will shut off, then back on how to start it?

redis-server redis.conf can use this command to start it back.

 Verify the success of start # ps -ef | grep redis

 

 

# Into the redis client src / redis-cli

 

# Quit quit client

 

 # Exit redis service:
 (1)pkill redis‐server
 (2) kill process ID
 (3)src/redis‐cli shutdown
 
 
 
 
 
 
 

Guess you like

Origin www.cnblogs.com/xiaosisong/p/12409158.html