安装wget
yum install wget
yum -y install gcc gcc-c++
安装yum -y install gcc gcc-c++
各种版本下载地址
http://download.redis.io/releases/
稳定版本
http://download.redis.io/releases/redis-stable.tar.gz
wget http://download.redis.io/releases/redis-stable.tar.gz

解压
tar xzf redis-stable.tar.gz
解压完成进入目录cd redis-stable
执行编译命令make(编译比较慢耐心等待)
进入src目录 cd src

安装,指定一个文件夹地址
make install PREFIX=/home/redis/6379

前往刚才解压目录,复制配置文件
cp redis.conf /home/redis/6379/

进入到刚才安装的目录/home/redis/6379目录 执行tree查看目录结构

redis-benchmark:redis性能测试工具
redis-check-aof:检查aof日志的工具
redis-check-dump:检查rdb日志的工具
redis-cli:连接用的客户端
redis-server:redis服务进程
redis-server启动

关闭服务redis-cli shutdown
默认情况redis不是后台运行,配置为后台运行

修改redis.conf中daemonize yes(是否是守护进程)
./bin/redis-server redis.conf

验证是否启动(三种方法)
ps -ef | grep redis

安装netstat
yum install net-tools
netstat -antpl | grep redis

./bin/redis-cli ping
./bin/redis-cli -h 127.0.0.1 -p 6379 ping

常用配置
daemonize yes|no(是否是守护进程)
port redis对外端口(单机多实例)
logfile redis系统日志(文件名)
dir redis工作目录(目录)
启动redis-cli后
config get * 得到配置文件key value返回
查看redis版本 ./bin/redis-cli --version
