redis-4.0.6 编译安装
redis-4.0.6 编译安装
https://redis.io/download #下载redis4.0.6
wget http://download.redis.io/releases/redis-4.0.6.tar.gz
yum install -y ruby rubygems gcc gcc-c++ psmisc
tar xf redis-4.0.6.tar.gz -C /usr/local/
cd /usr/local
mv redis-4.0.6 redis
cd redis
make
cd src
make install
cd ..
mkdir etc
mkdir bin
cp redis.conf etc/
cp redis-cli redis-server redis-sentinel redis-check-aof redis-benchmark bin/
vi /etc/profile
export PATH=$PATH:/usr/local/redis/bin
source /etc/profile
cd etc/
vi redis.conf
requirepass pwdpwd
daemonize yes
/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf
redis-cli 127.0.0.1 6379
keys *
quit