I just put the command in the shell file, easy to install, the code is as follows:
#!/bin/bash# Shell Execution Options: #-N reads only the shell script, but does not actually execute #-x Enter the tracking mode, showing each command executed #-C"string"read command from strings # download directory Downloadsdir=/root/downloads# installation directory Appdir=/usr/local/redis# determine if the backup directory exists, and create a new directory when not in storage [! -D $downloadsDir] && mkdir-p $downloadsDircd $downloadsDir # Download, unzip, compile wget http://download.redis.io/redis-stable.tar.gzTar xvzf redis-STABLE.TAR.GZCD Redis-Stablemake&&make test# if prompted for Tcl or later # yum install-y tcl# make test is generally recommended, I prompt you need TCL when make test8.5or newerinchorder to run the Redis test# wget http://prdownloads.sourceforge.net/tcl/tcl8.6.0-src.tar.gz# After downloading, go to the installation directory, go to UNIX, and then execute"./configure"And make , then make install# copy execution file cp src/redis-server/usr/local/bin/CP src/redis-cli/usr/local/bin/# Create directory mkdir/etc/Redismkdir/var/Redismkdir/var/redis/Logmkdir/var/redis/Runmkdir/var/redis/port# Copy Redis solution in the configuration file template in the directory CP redis.conf/etc/redis/redis.conf# Modifying the configuration file echo"################################ zhaoxiace DEFINE ##############################">>/etc/redis/Redis.confecho"daemonize Yes">>/etc/redis/Redis.confecho"Pidfile/var/redis/run/redis.pid">>/etc/redis/Redis.confecho"Logfile/var/redis/log/redis.log">>/etc/redis/Redis.confecho"Dir/var/redis/port">>/etc/redis/redis.conf# running Redisredis-server/etc/redis/redis.conf
Redis Cache fully automatic shell script installation