Download and install Redis on Linux

Download and install Redis on Linux: The following is the download and installation process. If you just want to install quickly, then just look at the commands in the picture. All download and install commands are in the picture.

1. Download the Redis installation package in the home directory.
Download the Redis installation package command: wget http://download.redis.io/releases/redis-5.0.5.tar.gz

Insert picture description here
2. Unzip the compressed package to get a file named redis-5.0.5.
Unzip command: tar xf redis-5.0.5.tar.gz

Insert picture description here
3. I want to install Redis to the /usr/locat/ directory, so the following operation is to move the redis-5.0.5 folder to the /usr/locat/ directory and rename it to the redis file

Insert picture description here
4. Go into the redis directory and execute the make command to compile the redis file

Insert picture description here
5. After the compilation is successful, enter the src directory and execute the command make install to install redis

Insert picture description here
6. To facilitate management, move the conf configuration file and common commands in the Redis file to a unified file, and create the etc and bin folders

Insert picture description here
7. Move the redis.conf file to the etc folder.
Execute the command: mv redis.conf /usr/local/redis/etc/

Insert picture description here
Enter the src directory and move mkreleasehdr.sh redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-server to /usr/local/redis/bin/

Execute command: mv mkreleasehdr.sh redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-server /usr/local/redis/bin/

Insert picture description here
8. Execute redis-server to start redis

Insert picture description here
9. Enter the etc directory and execute vim redis.conf (if this command does not work, use the vi redis.conf command, because there is no vim command for the CentOS minimal installation) command to open the redis.conf file

Insert picture description here
Find daemonize in the redis.conf file and change no to yes

Insert picture description here
10. Start the redis service again, and specify the startup service configuration file.
redis-server /usr/local/redis/etc/redis.conf

Insert picture description here
Redis is installed, I wish you success

Guess you like

Origin blog.csdn.net/qq_41936224/article/details/108882718