Installation of Redis
1. Upload redis-4.0.8.tar.gz to/usr/local/src folder
2. Unzip the tar xzf redis-4.0.8.tar.gz
3. CD redis-4.0.8
4, compile make (because the source code to download, need to compile)
After compiling, you can see the corresponding SRC folder, conf file in the redis-4.0.8 file.
5, after the successful compilation, enter the SRC folder, execute make install for Redis installation
Redis the deployment
After the installation is successful, Redis is deployed below
1, first for the convenience of management, the Redis file in the Conf configuration files and common commands to move to the unified file
Create a 2 folder
Mkdir-p/usr/local/src/redis-4.0.8/bin
Mkdir-p/usr/local/src/redis-4.0.8/ect
2. Execute the Linux file Move command:
Copy the code code as follows:
Mv/usr/local/src/redis-4.0.8/redis.conf/usr/local/src/redis-4.0.8/etc
Cd/usr/local/src/redis-4.0.8/src
MV Redis-benchmark Redis-check-dump Redis-cli Redis-server/usr/local/src/redis-4.0.8/bin
3, execute Redis-server command, start Redis service
Note: The Redis service, which executes the redis-server boot directly, is run directly in the foreground (as an effect), that is, if LUnix closes the current session after executing the command, the Redis service is closed. Under normal circumstances, starting the Redis service requires booting from the background and specifying a startup configuration file.
4. Back-up Redis service
A) First edit the Conf file and change the Daemonize property to Yes (indicating that you need to run in the background)
CD etc/
Vi redis.conf
b) Start the Redis service again and specify the startup service profile
Redis-server/usr/local/src/redis-4.0.8/etc/redis.conf
5. After the server starts successfully, execute REDIS-CLI to start the Redis client and view the port number.
(10) Linux installation Redis-4.0.8