A. Experimental Environment
CentOS 6.5 x86_64
two. redis official website: https://redis.io/
three. preparing the software
[Email protected] ~]# wgethttp://download.redis.io/releases/redis-3.2.6.tar.gz
Four. installing Redis
1. Unzip
[Email protected] ~]# tar-zxvfredis-3.2.6.tar.gz
2. compiling
[Email protected] ~]# CD redis-3.2.6
[[email protected] redis-3.2.6]# make
1.3. to continue compiling, perform the make Distclean before doing
1.4. Compiling tests
[Email protected] redis-3.2.6]# maketest
1.5. continue compiling test, execute command make test
1.6. After the compilation is complete, there are some more files in the SRC directory under the current directory, such as
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/8B/B2/wKioL1hWMeXwFoOaAABgoXC336o122.png-wh_500x0-wm_3 -wmp_4-s_1212967612.png "title=" A.png "alt=" Wkiol1hwmexwfooaaabgoxc336o122.png-wh_50 "/>
7. Make Install , the purpose is to Redis-server, Redis-cli, redis-check-aof, Redis-check-dump and other files to the/usr/local/bin directory, you can also manually move
[Email protected] redis-3.2.6]# Makeinstall
8. View/usr/local/bin/
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/8B/B2/wKioL1hWM_rBWZHLAAA-FydsTDg257.png-wh_500x0-wm_3 -wmp_4-s_3591946029.png "title=" B.png "alt=" Wkiol1hwm_rbwzhlaaa-fydstdg257.png-wh_50 "/>
9. Review the Redis version to verify that the installation was successful
[Email protected] ~]# redis-server-v
Redis server v=3.2.6sha=00000000:0 malloc=jemalloc-4.0.3 bits=64 build=c44f26b41b545342
Five. Configure Redis
1. Create a Redis directory (not required)
This process is only for the purpose of managing Redis-related resources in a unified way.
[email protected] ~]# mkdir-p/usr/local/redis/etc used to store configuration files
[email protected] ~]# Mkdir-p/usr/local/redis/var used to store process files and log files
[email protected] ~]# Mkdir-p/usr/local/redis/data used to store data files
2. Modifying configuration files, setting parameters
Copy configuration file
[Email protected] redis-3.2.6]# cpredis.conf/usr/local/redis/etc/
Set the service to run after the daemon mode:
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/8B/B6/wKiom1hWNArzuU2qAAAeuRRBEtw311.png-wh_500x0-wm_3 -wmp_4-s_1113459486.png "title=" C.png "alt=" Wkiom1hwnarzuu2qaaaeurrbetw311.png-wh_50 "/>
Modify the PID directory to a new directory:
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/8B/B2/wKioL1hWNBWQsoEcAAAgiqLVRrk648.png-wh_500x0-wm_3 -wmp_4-s_2046284581.png "title=" D.png "alt=" Wkiol1hwnbwqsoecaaagiqlvrrk648.png-wh_50 "/>
Modify the log directory to a new directory:
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/8B/B2/wKioL1hWNCDRCGiKAAAreTghckI894.png-wh_500x0-wm_3 -wmp_4-s_2272391010.png "title=" E.png "alt=" Wkiol1hwncdrcgikaaaretghcki894.png-wh_50 "/>
Modify the data directory to a new directory:
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/8B/B6/wKiom1hWNCnS4a4TAAAUuBi9hl0271.png-wh_500x0-wm_3 -wmp_4-s_658166075.png "title=" F.png "alt=" Wkiom1hwncns4a4taaauubi9hl0271.png-wh_50 "/>
3. Start Redis Service
[Email protected] ~]# redis-server/usr/local/redis/etc/redis.conf
4. View the Redis process
[Email protected] ~]# Ps-ef | Grepredis
5. Client Connections
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/8B/B6/wKiom1hWNDLQvKBxAAAKJq2UVqU284.png-wh_500x0-wm_3 -wmp_4-s_3602681536.png "title=" G.png "alt=" Wkiom1hwndlqvkbxaaakjq2uvqu284.png-wh_50 "/>
Six. service scripts and boot-up
1. Copy the Redis boot script
[Email protected] redis-3.2.6]# Cputils/redis_init_script/etc/init.d/redis
2. Modifying startup Scripts
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/8B/B2/wKioL1hWNEODqPxSAAAeV-meheA729.png-wh_500x0-wm_3 -wmp_4-s_3862400750.png "title=" H.png "alt=" Wkiol1hwneodqpxsaaaev-mehea729.png-wh_50 "/>
3. Execute permissions for scripts
[Email protected] init.d]# chmod +xredis
4. Set boot up
[Email protected] ~]# chkconfig Redison
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/8B/B6/wKiom1hWNHPQZXbJAAAMmmYzjMs979.png-wh_500x0-wm_3 -wmp_4-s_2613848155.png "title=" J.png "alt=" Wkiom1hwnhpqzxbjaaammmyzjms979.png-wh_50 "/>
5. perform chkconfig Redis on again, successfully.
At this point, the Redis installation configuration is complete!
This article from "Rookie of the World" blog, please be sure to keep this source http://guoxh.blog.51cto.com/10976315/1883729
Installation and configuration of redis-3.2.6 under CentOS6.5