Redis 下载安装步骤:

  1. 下载 redis 源码:

    [huey@huey-K42JE ~]$ wget http://download.redis.io/releases/redis-x.y.z.tar.gz
  2. 解压文件:
    [huey@huey-K42JE ~]$ tar xzf redis-x.y.z.tar.gz
  3. 编译源码:
    [huey@huey-K42JE ~]$ cd redis-x.y.z
    [huey@huey-K42JE redis-x.y.z]$ make
  4. 编译完成后,进入 src 目录:
    [huey@huey-K42JE src]$ cd src
  5. 启动 redis 服务:
    [huey@huey-K42JE src]$ ./redis-server &
  6. 验证 redis 服务是否成功启动:
    [huey@huey-K42JE src]$ ./redis-cli ping
    PONG
  7. 启动 redis 客户端:
    [huey@huey-K42JE src]$ ./redis-cli
    127.0.0.1:6379>
  8. 停止 redis 服务:
    [huey@huey-K42JE src]$ ./redis-cli SHUTDOWN
05-07 15:29