下载

    http://download.redis.io/releases/

编译安装

    make PREFIX=/usr/local/redis install
    make install 

配置文件

    cp /usr/local/redis-3.0.0/redis.conf  /usr/local/redis/

daemonize yes # 后台启动
#bind 127.0.0.1 # 注释绑定的IP
protected-mode no # 关闭保护模式
requirepass 123456 # 设置密码

启动 ./redis-server ./redis-server ./redis.conf

让redis开机自启 vim /etc/rc.local /usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf