Easy installation process under Linux:
1. Install GCC before installing the source code, otherwise the compilation will go wrong.
2. Download the source code, go to http://download.redis.io/releases/in this folder to find the version you want to install, I downloaded wget http://download.redis.io/releases/redis-3.2.3.tar.gz.
3. After the download is complete, unzip: Tar zxvf redis-3.2.3.tar.gz
4.CD redis-3.2.3
5.make MALLOC=LIBC
6. In the previous layer of SRC, there is a default configuration file, the name is redis.conf, copy this file to the SRC directory, with vim to edit two of the configuration files, or later can not be tested with the Redis client,
One is to comment out the bind 127.0.0.1 line, otherwise it will not be able to do remote testing, there is protected-mode Yes in the line to change yes to No, the purpose is to remove Redis does not enter the protection mode.
7. #启动redis
Command: Src/redis-server src/redis.conf &, the purpose of using & is to run in the background, you need to specify the configuration file manually, which one to use to modify.
8. #测试,
Enter set Foo 1, if return OK, it is successful, if the output protection mode and other prompts, indicating that the configuration file modification failed, or when starting to specify the wrong configuration file.
9. #关闭redis
Command: SRC/REDIS-CLI shutdown
The above is the installation process under Linux, the following is the process under window:
1. Download the compiled EXE file, in this interface find the appropriate version to download https://github.com/dmajkic/redis/downloads.
2. Unzip the downloaded installation package, do not install, after the extraction is EXE executable file.
3. Use CMD to enter the console, then switch to the extracted directory, which has: Redis-cli.exe executable file.
4. Start with redis-cli.exe-h ip-p port, my liunx server IP is: The 43.224.34.* port number is using the default port number: 6379, the command is: Redis-cli.exe-h 43.224.34.*-P 6379.
If you return normal link information, both Linux and Windows are installed correctly.
I don't want to add a Redis path to the environment variable, so I've defined two custom variables in/etc/profile:
Alias rdbs= '/data/redis/src/redis-server/data/redis/src/redis.conf & '
Alias rdbc= '/data/redis/src/redis-cli '
This allows you to quickly start the server and client using the RDBS,RDBC command, and if you want to boot automatically, you can add it on the last line of the/etc/rc.local file:
/data/redis-3.2.3/src/redis-server/data/redis-3.2.3/src/redis.conf &
Linux Windows Redis Installation