redis install

 环境:CentOS Linux release 7.4.17

#/bin/bash

#redis install

#redis-3.2.9 install

cd /usr/local/src/redis_install/

wget http://download.redis.io/releases/redis-3.2.9.tar.gz

tar zxvf redis-3.2.9.tar.gz

cd redis-3.2.9

make

make install

mkdir -p /usr/local/redis/bin

mkdir -p /usr/local/redis/etc

mv /usr/local/src/redis_install/redis-3.2.9/redis.conf  /usr/local/redis/etc/

cd /usr/local/src/redis_install/redis-3.2.9/src/

mv mkreleasehdr.sh  redis-cli redis-server redis-benchmark redis-check-aof redis-check-rdb redis-sentinel  redis-trib.rb  /usr/local/redis/bin/

sed -i '61c\ #bind 127.0.0.1'  /usr/local/redis/etc/redis.conf

sed -i '128c\ daemonize  yes'  /usr/local/redis/etc/redis.conf

sed -i '480c\ requirepass password'  /usr/local/redis/etc/redis.conf

/usr/local/redis/bin/redis-server  /usr/local/redis/etc/redis.conf

netstat -tnlpu |grep 6379

你可能感兴趣的:(redis install)