Skip to content

Commit

Permalink
添加清理redis指令
Browse files Browse the repository at this point in the history
  • Loading branch information
weiliang-ms committed Oct 10, 2021
1 parent c03f154 commit 451bb64
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ sudo cp easyctl /usr/local/bin
- `add`
- `clean`
- [x] [清理多机redis]()
- [x] [清理主机dns配置](https://weiliang-ms.github.io/easyctl/%E6%B8%85%E7%90%86%E6%8C%87%E4%BB%A4%E9%9B%86/01%E5%A4%9A%E4%B8%BB%E6%9C%BAdns%E9%85%8D%E7%BD%AE%E6%B8%85%E7%90%86.html)
- `deny`
- [x] [防火墙](https://weiliang-ms.github.io/easyctl/%E7%A6%81%E7%94%A8%E6%8C%87%E4%BB%A4%E9%9B%86/03%E4%B8%BB%E6%9C%BA%E7%A6%81%E7%94%A8%E9%98%B2%E7%81%AB%E5%A2%99.html)
Expand All @@ -66,7 +67,7 @@ sudo cp easyctl /usr/local/bin
- [x] [从harbor批量下载chart](https://weiliang-ms.github.io/easyctl/%E5%AF%BC%E5%87%BA%E6%8C%87%E4%BB%A4%E9%9B%86/01%E4%BB%8Eharbor%E5%BA%93%E4%B8%AD%E5%AF%BC%E5%87%BAchart.html)
- [x] [从harbor导出镜像tag列表](https://weiliang-ms.github.io/easyctl/%E5%AF%BC%E5%87%BA%E6%8C%87%E4%BB%A4%E9%9B%86/02%E4%BB%8Eharbor%E5%BA%93%E4%B8%AD%E5%AF%BC%E5%87%BA%E9%95%9C%E5%83%8Ftag%E5%88%97%E8%A1%A8.html)
- `install`
- [x] [单机redis]()
- [x] [单机redis](https://weiliang-ms.github.io/easyctl/%E5%AE%89%E8%A3%85%E6%8C%87%E4%BB%A4%E9%9B%86/01%E5%AE%89%E8%A3%85%E5%8D%95%E6%9C%BAredis.html)
- [x] [redis集群](https://weiliang-ms.github.io/easyctl/%E5%AE%89%E8%A3%85%E6%8C%87%E4%BB%A4%E9%9B%86/02%E5%AE%89%E8%A3%85redis%E9%9B%86%E7%BE%A4.html)
- `set`
- [x] [时区](https://weiliang-ms.github.io/easyctl/%E8%AE%BE%E7%BD%AE%E6%8C%87%E4%BB%A4%E9%9B%86/05%E5%A4%9A%E4%B8%BB%E6%9C%BA%E8%AE%BE%E7%BD%AE%E6%97%B6%E5%8C%BA.html)
Expand Down
6 changes: 5 additions & 1 deletion book/安装指令集/01安装单机redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,8 @@ $ easyctl install redis -c config.yaml --debug
5.启动命令/节点:
service redis-33333 start
6.二进制目录:/usr/local/bin/redis-*--- PASS: TestInstallRedis (31.00s)
```
```

### 卸载

参考[清理redis](../清理指令集/01多主机redis清理.md)
46 changes: 46 additions & 0 deletions book/清理指令集/01多主机redis清理.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## 清理redis服务及文件

### 版本&兼容性

> 版本支持
- [v0.7.11-alpha以上](https://github.com/weiliang-ms/easyctl/releases/)

> 兼容性
- [x] `CentOS6`
- [x] `CentOS7`

### 使用方式

> 参考以下链接进行安装
- [安装说明文档](../安装文档/README.md)

> 生成默认配置文件
```shell
$ easyctl clean redis
I1001 11:13:06.384839 126576 track.go:50] 检测到配置文件参数为空,生成配置文件样例 -> config.yaml
```

> 修改配置文件
`config.yaml`, 修改主机列表。`easyctl`根据主机列表`ssh`远程至目标主机执行清理`job`

```yaml
server:
- host: 10.10.10.[1:40]
username: root
privateKeyPath: "" # ~/.ssh/id_rsa,为空默认走password登录;不为空默认走密钥登录
password: 123456
port: 22
excludes:
- 192.168.235.132
```
> 执行
```shell
$ easyctl clean redis -c config.yaml --debug
```
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ clean-dns:
> 执行
```shell
$ easyctl track tail-log -c config.yaml
$ easyctl clean dns -c config.yaml --debug
```

### 配置样例
Expand Down
1 change: 0 additions & 1 deletion cmd/clean/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ var cleanRedisCmd = &cobra.Command{
command.Item{
Cmd: cmd,
Fnc: clean.Redis,
DefaultConfig: dnsDefaultConfig,
ConfigFilePath: configFile,
}); err.Err != nil {
panic(err.Err)
Expand Down

0 comments on commit 451bb64

Please sign in to comment.