Inux Installation Configuration Redis graphics
2015-09-14 00:29 number of reviews 1 viewed 1493 views+
The detailed steps for installing Redis under a Linux system are as follows:
1. First download a Redis installation package: http://www.daixiaorui.com/source/13.html. You can also go to the official website to download the latest version: Http://redis.io/download.
2. Unzip Redis:tar zxvf redis-2.8.22.tar.gz under Linux
3. After the decompression is complete, go to the extracted directory "redis-2.8.22", the command is: CD redis-2.8.22.
4. Execute the Make MALLOC=LIBC command if a "/bin/sh:cc:command not found" error occurs because the system does not have a GCC environment installed. At this point we can install GCC with yum (under CentOS), and after the installation is successful, the make command can be executed successfully to compile Redis.
5. After the compilation is successful, enter the SRC directory. Create a Redis run directory Mkdir/usr/local/redis, and then copy the REDIS-CLI and redis-server below the SRC directory to/usr/local/redis, copy the command: CP REDIS-CLI Redis-server/usr/local/redis.
650) this.width=650; "src=" Http://www.daixiaorui.com/upload/image/201509/1442245540184804.png "alt=" copy cp named "style= "margin:0px;padding:0px;border:0px;text-indent:0px;"/>
6. Run the command CD. Go back to the parent directory and copy the redis.conf into the/usr/local/redis.
650) this.width=650; "src=" Http://www.daixiaorui.com/upload/image/201509/1442245549149487.png "alt=" copy CP command "style= "margin:0px;padding:0px;border:0px;text-indent:0px;"/>
7. Go to the/usr/local/redis/directory and execute the command./redis-server, for example, you can see that the Redis service is already started. However, pressing CTRL + C breaks down and we want to set it to run in the background.
650) this.width=650; "src=" http://www.daixiaorui.com/upload/image/201509/1442246217384794.jpg "alt=" Redis Installation Successful Interface " Style= "margin:0px;padding:0px;border:0px;text-indent:0px;"/>
8. Open the profile redis.conf with VI, locate Daemonize=no, change No to Yes, save and exit.
650) this.width=650; "src=" Http://www.daixiaorui.com/upload/image/201509/1442246125918221.png "alt=" Modify the Redis configuration Daemonize=no "style=" margin:0px;padding:0px;border:0px;text-indent:0px; "/>
9. Run the command "./redis-server redis.conf", if you do not make an error, it means that Redis has successfully run in the background, you can also check whether the service is actually started by the command.
650) this.width=650; "src=" Http://www.daixiaorui.com/upload/image/201509/1442246114657542.png "alt=" after Redis installation succeeded " Style= "margin:0px;padding:0px;border:0px;text-indent:0px;"/>
10. After the service is started, execute "./redis-cli" and open the Redis client to test if Redis is working properly.
650) this.width=650; "src=" Http://www.daixiaorui.com/upload/image/201509/1442246092350682.png "alt=" Redis installation succeeded " Style= "margin:0px;padding:0px;border:0px;text-indent:0px;"/>
At this point, the Redis installation is complete.
This article is from the "JSON in PHP usage" blog, so be sure to keep this source http://zhaozhangxiao.blog.51cto.com/10609825/1875122
Redis installation in Linux