linux-tutorial/docs/deploy/tool/redis/install-redis.md

51 lines
914 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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