Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bf0f8c1

Browse files
committed
Redis关闭
1 parent ee14056 commit bf0f8c1

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

‎Redis/redis-install.md‎

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
```lua
1414
00-RELEASENOTES BUGS CONTRIBUTING COPYING deps INSTALL Makefile MANIFESTO README.md redis.conf runtest
1515
runtest-cluster runtest-sentinel sentinel.conf src tests utils
16-
```
16+
```
1717
+ 编译完成之后,可以看到解压文件redis-3.0.7 中会有对应的src、conf等文件
1818
+ 这和windows下安装解压的文件一样,大部分安装包都会有对应的类文件、配置文件和一些命令文件。
1919
+ 进入src文件夹,执行make install进行Redis安装
@@ -29,7 +29,7 @@
2929
INSTALL install
3030
INSTALL install
3131
INSTALL install
32-
```
32+
```
3333
#### 二、部署文件结构
3434
+ 首先为了方便管理,将Redis文件中的conf配置文件和常用命令移动到统一文件中
3535
+ 创建以下文件目录
@@ -90,7 +90,7 @@
9090
9191
rename-command DEBUG "tinywangithubDEBUG"
9292
```
93-
+ 启动redis服务,并指定启动服务配置文件,检测运行端口,为了安全,请不要使用root用户去启动
93+
启动redis服务,并指定启动服务配置文件,检测运行端口,为了安全,请不要使用root用户去启动
9494
```java
9595
$ sudo chown -R www:www /usr/local/redis/ //赋予指定该用户组,而非root账号
9696
$ /usr/local/redis/bin/redis-server /usr/local/redis/etc/redis63700.conf
@@ -194,8 +194,18 @@
194194
www 1730 0.0 0.1 14224 1024 pts/0 S+ 13:08 0:00 grep --color=auto redis
195195
196196
```
197-
198-
#### 五、Redis数据迁移
197+
#### 五、Redis关闭
198+
* 命令方式关闭
199+
```
200+
$ redis-cli -h 127.0.0.1 -p 6379
201+
127.0.0.1:6379> shutdown
202+
```
203+
* 进程号杀掉redis
204+
```
205+
ps -ef | grep redis
206+
kill -9 XXX
207+
```
208+
#### 六、Redis数据迁移
199209
+ 查找RDB文件:
200210

201211
```sudo find / -name dump.rdb```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /