下载

    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/bin

启动

    ./redis-server

后台启动

     daemonize yes
     
    ./redis-server ./redis.conf

让redis开机自启

    vim /etc/rc.local
    //添加
    /usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf

关闭保护模式,以能够远程连接

protected-mode no

设置密码

requirepass 123456