下载及解压redis:
wget http://download.redis.io/releases/redis-3.2.8.tar.gz
tar -zxvf redis-3.2.8.tar.gz
cd redis-3.2.8
编译安装redis:
make
cd src
make install
创建redis文件夹及移动相应文件:
mkdir -p /usr/local/redis/etc
mkdir -p /usr/local/redis/bin
mv /usr/local/redis-3.2.8/redis.conf /usr/local/redis/etc/
mv /usr/local/redis-3.2.8/src/mkreleasehdr.sh /usr/local/redis/bin/
mv /usr/local/redis-3.2.8/src/redis-benchmark /usr/local/redis/bin/
mv /usr/local/redis-3.2.8/src/redis-check-aof /usr/local/redis/bin/
mv /usr/local/redis-3.2.8/src/redis-check-rdb /usr/local/redis/bin/
mv /usr/local/redis-3.2.8/src/redis-cli /usr/local/redis/bin/
mv /usr/local/redis-3.2.8/src/redis-sentinel /usr/local/redis/bin/
mv /usr/local/redis-3.2.8/src/redis-server /usr/local/redis/bin/
mv /usr/local/redis-3.2.8/src/redis-trib.rb /usr/local/redis/bin/
修改 redis 配置文件 redis.conf,将 daemonize no 改为 daemonize yes
启动redis:
/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf