Install redis and linuxredis in Linux
Install redis in Linux
-- @ Liang WP
Abstract: Install redis in Linux.
1. Download redis
1. Search for redis in Baidu. If one of the results is only marked with Redis, click to go to the official redis website.
2. Click Download In the top navigation bar to go To the Download page. Then, click the Download button under Stable to start downloading.
Ii. Upload the installation package to the server
1. Use FTPCute, WinSCP, and other tools to upload the installation package to the server.
2. The path is/usr/local.
3. Install redis
1. Use Linux remote connection tools such as Xshell to access the server.
2. Enter the/usr/local directory. The command is cd/usr/local.
3. Unzip the installation package and the command is tar-xvf redis-3.0.6.tar.gz.
4, enter the decompressed folder, command is cd/usr/local/redis-3.0.6.
5. Compile. The command is make.
6. After compilation, there are four executable files in the src directory: redis-server, redis-benchmark, redis-cli, and redis. conf, copy them to other places, execute these six commands in order: mkdir/usr/redis, cd/usr/local/redis-3.0.6/src, cp redis-server/usr/redis, cp redis-benchmark/usr/redis, cp redis-cli/usr/redis, cp .. /redis. conf/usr/redis.
7. After the copy, enter the new folder with the command cd/usr/redis.
4. Start redis
1. Start the redis server. The command is./redis-server &.
2. If an image is displayed, the startup is successful.
3. After the image appears, press enter again. The program continues to run in the background and does not block the current window. This is the role of the command.