1、 首先下载Redis源码包
#wget http://download.redis.io/releases/redis-2.8.19.tar.gz
2、 解压并且安装
#tar -xzvf redis-2.8.19.tar.gz #cd redis-2.8.19 #make #cd src && make install
3、 创建存放Redis的目录
# mkdir –p /usr/local/redis/{etc,bin} # cp ../redis.conf /usr/local/redis/etc/ # cp ../sentinel.conf /usr/local/redis/etc/ # cp redis-benchmark mkreleasehdr.sh redis-check-aof redis-check-dump redis-cli redis-server redis-sentinel /usr/local/redis/bin/
4、 编辑配置文件
# vim /usr/local/redis/etc/redis.conf #将daemonize no 改为 daemonize yes
5、 开启服务并且登录
#/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf #/usr/local/redis/bin/redis-cli
版权声明:未经博主允许不得转载。http://smister.com/post-13/redis-install.html
S_林少 :
2016-12-26 15:55:57 回复