linux-tutorial/docs/deploy/tool/redis/install-redis.md
Zhang Peng e905a28f93 ✏️ 更改路径
2018-09-29 10:17:07 +08:00

51 lines
860 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Redis 安装
## 安装
安装步骤如下:
1下载并解压到本地
进入官网下载地址https://redis.io/download ,选择合适的版本下载。
我选择的是最新稳定版本 4.0.8http://download.redis.io/releases/redis-4.0.8.tar.gz
我个人喜欢存放在:`/opt/redis`
```
wget -O /opt/redis/redis-4.0.8.tar.gz http://download.redis.io/releases/redis-4.0.8.tar.gz
cd /opt/redis
tar zxvf redis-4.0.8.tar.gz
```
2编译安装
执行以下命令:
```
cd /opt/redis/redis-4.0.8
make
```
## 启动
**启动 redis 服务**
```
cd /opt/redis/redis-4.0.8/src
./redis-server
```
**启动 redis 客户端**
```
cd /opt/redis/redis-4.0.8/src
./redis-cli
```
## 脚本
以上两种安装方式,我都写了脚本去执行:
| [安装脚本](https://github.com/dunwu/linux/tree/master/codes/deploy/tool/redis) |