Redis 3.2.8 Latest Edition Installation Tutorial under Centos7


I. System Environment and Version Description

Redis’s version is the current official version redis-3.2.8.

II. Installation steps of Redis

2.1 Download Redis installation package online

[[email protected] lzh]# wget
--2017-04-18 09:37:12--
Host download. redis. IO (download. redis. io)...
Connecting ( | |: 80... Connected.
HTTP request has been issued, waiting for response... 200 OK
Length: 1547237 (1.5M) [application/x-gzip]
Save to: "redis-3.2.8.tar.gz"
100%[======================================================================>] 1,547,237,315KB/s takes 5.6s. 
2017-04-18 09:37:20 (268 KB/s) - Preserved "redis-3.2.8.tar.gz" [1547 237/1547 237])

2.2 Unzip and download Redis source code compression package to generate a new directory redis-3.2.8

$ tar xzf redis-3.2.8.tar.gz

2.3 Enter the directory and execute make compilation

$ cd redis-3.2.8

$ make

It takes a while to compile until you see it


Note: After compiling the make command, six executable files are generated in the SRC directory, respectively.


New version redis-check-dump to redis-check-rdb

III. Redis Installation Configuration

3.1 Install Redis and execute make install. Six executable files generated by make compilation will be copied to / usr / local / bin directory.

[[email protected] redis-3.2.8]# make install
cd src && make install
Make [1]: Enter the directory "/ home/lzh/redis-3.2.8/src"
Hint: It's a good idea to run 'make test' ;)
 INSTALL install
 INSTALL install
 INSTALL install
 INSTALL install
 INSTALL install
Make [1]: leave the directory "/ home/lzh/redis-3.2.8/src"

3.2 After executing. / utils/ configuration, Redis can start with the system. During execution, you will choose port, file name, etc. I choose default.

3.3 View boot list

[[email protected] redis-3.2.8]# chkconfig --list
Note: The output only shows SysV services, not native system D services. SysV configuration data may be overwritten by native system D configuration. 
  If you want to list system D services, execute'system CTL list-unit-files'.
  To view services enabled for a specific target, execute
  'systemctl list-dependencies [target]'。
Netconsole 0:Guan 1:Guan 2:Guan 3:Guan 4:Guan 5:Guan 6:Guan
Network 0:Close 1:Close 2:Open 3:Open 4:Open 5:Open 6:Close
Redis_63790:Close 1:Close 2:Open 3:Open 4:Open 5:Open 6:Close

IV. Viewing, Opening and Closing Redis Services

4.1 View Redis process by ps-ef | grep redis command

[[email protected] redis-3.2.8]# ps -ef|grep redis
root   12831   1 0 10:21 ?    00:00:01 /usr/local/bin/redis-server
root   13100  4090 0 10:29 pts/0  00:00:00 grep --color=auto redis

4.2 Close Redis service operation via / etc/init.d/redis_6379 stop command or (service redis_6379 stop)

4.3 Open Redis service operation by / etc/init.d/redis_6379 start command or (service redis_6379 start)

You can also start with the redis-server command

$ src/redis-server

V. Redis Testing

[[email protected] bin]# redis-cli > flushdb -- Clear the currently selected database
OK> set testkey 2
OK> get testkey

The above is the whole content of this article. I hope it will be helpful to everyone’s study, and I hope you will support developpaer more.

Recommended Today

Do arm linux cross compilation once

Cross compilation Why cross compile In fact, cross compilation is relative to native build. I believe that when you first learn C / C + + languages, you write programs on the computer, then compile and generate executable files on the computer, and finally run them on the computer. The whole process of editing, compiling […]