1. installation package Download
Official website Download: http://www.redis.io/
Installed version: 3.0.7
Installation Environment: CentOS
Download command: wget http://download.redis.io/releases/redis-3.0.7.tar.gz (Enter the official website download page, the specific version on the right-click Copy)
2. Installation Steps
1 $ wget http://download.redis.io/releases/redis-3.0. 7. Tar. GZ 2 $ tar xzf redis-3.0. 7. Tar. GZ 3 $ cd redis-3.0. 7 4 $ make
After make is finished, the compiled binaries are placed under the SRC folder, and you can simply execute the following command to start the Redis service:
$ src/redis-server
To start the REDIS-CLI client, you can connect to the Redis service:
$ src/redis-cli
3. Testing
Check to see if the REDIS system is functioning properly and execute make test in the redis-3.0.7 directory. Make sure the system has ctl8.5 (or higher) installed before executing the command. Install the CTL First:
1 $ wget http://downloads.sourceforge.net/tcl/tcl8. 6.1-src.tar. GZ 2 $ tar xvf tcl8. 6.1-src.tar. 3 $ cd Tcl8. 6.1/UNIX4 $./Configure5$make6 $ make Install
Go to the redis-3.0.7 directory and execute make test. The test report will be given after the end:
Execute the Make install command in the redis-3.0.7 directory, which copies executables such as Redis-server, REDIS-CLI, and so on to the Usr/local/bin directory.
4. How to start Redis
Copy the redis.conf from the redis-3.0.7 directory to the ~/myredis directory (the Redis working directory) and make a backup. Under Redis default configuration, set Daemonize No to modify it to daemonize Yes to start the daemon and save exit. Start with the configuration file that you just modified:
$ redis-server ~/myredis/redis.conf
Note: in which directory The Redis-server is started, the persistent file Dump.rdb will be stored in which directory .
5. Turn off Redis service
① the Redis-server service by knocking the shutdown command in the REDIS-CLI.
② using the KILL command:
$ pgrep //kill4026 //killing process
1. Redis Installation and startup