About Redis is not introduced, the installation process reference: Http://www.cnblogs.com/silent2012/p/3499654.html.
#!/bin/bash# defining the installation directory export Redis_home=/home/test/redis# Creating the installation directorymkdir$REDIS _home#下载并解压安装包, Redis-2.8. A.Tar. GZ is currently the latest stable version
#注: Offline environment also upload your ownwgethttp//download.redis.io/releases/redis-2.8.12.tar.gzTar-ZXF redis-2.8. A.Tar. GZCD Redis-2.8. A/#编译后把重要文件拷贝到安装目录中 Make>/dev/NULLCPredis.conf $REDIS _homeCPsrc/redis-Server $REDIS _homeCPsrc/redis-CLI $REDIS _homeCPsrc/redis-Benchmark $REDIS _homeCPsrc/redis-Sentinel $REDIS _home# need to configure this environment setting for memorysudo Echo "vm.overcommit_memory = 1">>/etc/sysctl.confsudoSysctl vm.overcommit_memory=1#启动rediscd $REDIS _homeredis-server redis.conf >/dev/NULL&#测试, such as performing a Redis-CLI Ping shows pong for boot successif["' redis-cli ping ' = ="PONG" ]; Then Echo "Redis startup."Endif#关闭redisredis-CLI shutdown