#!/bin/bash # change to root echo "start to install build env..." sudo yum groupinstall "Development Tools" sudo yum install wget echo "start download redis source code" wget http://download.redis.io/releases/redis-5.0.4.tar.gz sudo mv redis-5.0.4.tar.gz /usr/local cd /usr/local sudo tar zvxf redis-5.0.4.tar.gz cd redis-5.0.4 echo "start install redis¡..." sudo make && sudo ake install cd src sudo cp redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-sentinel redis-server redis-trib.rb /usr/bin sudo mkdir -p /etc/redis sudo cp ../redis.conf /etc/redis cd /etc/redis sudo sed -i '136s/no/yes/g' redis.conf sudo sed -i '88s/yes/no/g' redis.conf #sed -i '69s/bind 127.0.0.1/#bind 127.0.0.1/g' redis.conf echo "start redis server" sudo redis-server /etc/redis/redis.conf cnt=`ps aux | grep redis | wc -l` if [ ${cnt} > 1 ]; then echo "start server ok!" fi