Redis - 环境的安装配置
Redis 下载安装步骤:
- 下载 redis 源码:
[huey@huey-K42JE ~]$ wget http://download.redis.io/releases/redis-x.y.z.tar.gz
- 解压文件:
[huey@huey-K42JE ~]$ tar xzf redis-x.y.z.tar.gz
- 编译源码:
[huey@huey-K42JE ~]$ cd redis-x.y.z [huey@huey-K42JE redis-x.y.z]$ make
- 编译完成后,进入 src 目录:
[huey@huey-K42JE src]$ cd src
- 启动 redis 服务:
[huey@huey-K42JE src]$ ./redis-server &
- 验证 redis 服务是否成功启动:
[huey@huey-K42JE src]$ ./redis-cli ping PONG
- 启动 redis 客户端:
[huey@huey-K42JE src]$ ./redis-cli 127.0.0.1:6379>
- 停止 redis 服务:
[huey@huey-K42JE src]$ ./redis-cli SHUTDOWN