File tree Expand file tree Collapse file tree 2 files changed +24
-9
lines changed Expand file tree Collapse file tree 2 files changed +24
-9
lines changed Original file line number Diff line number Diff line change 27
27
-- 响应体
28
28
ngx .say (resp .body )
29
29
30
- httpc :close ()
30
+ httpc :close ()
31
+
32
+
33
+ local var = ngx .var
34
+ local uri = var .uri
35
+
36
+ local stream_name = var .stream_name
37
+ local auth_key = var .auth_key
38
+ local expire_time = string.sub (auth_key ,0 ,10 )
39
+ local rand = " 0"
40
+ local uid = " 0"
41
+ local private_key = " Tinywan123"
42
+ local sstring = uri .. " -" .. expire_time .. " -" .. rand .. " -" .. uid .. " -" .. private_key
43
+ local hash_value = ngx .md5 (sstring )
44
+
45
+ ngx .say (" URI :: " ,uri )
46
+ ngx .say (" stream_name::" ,stream_name )
47
+ ngx .say (" auth_key ::" ,auth_key )
48
+ ngx .say (" expire_time :: " ,expire_time )
49
+ ngx .say (" sstring :: " ,sstring )
50
+ ngx .say (" hash_value :: " ,hash_value )
Original file line number Diff line number Diff line change 1
1
## Redis 简易安装教程
2
2
#### 一、安装编译
3
3
+ 下载、解压
4
-
5
- ```
4
+ ``` Bash
6
5
wget http://download.redis.io/releases/redis-3.2.8.tar.gz
7
- tar -zxvf redis-3.2.8.tar.gz
6
+ tar -zxvf redis-3.2.8.tar.gz
7
+ cd redis-3.2.8
8
8
```
9
-
10
9
+ make 编译
11
10
12
11
+ 编译完成之后,可以看到解压文件redis-3.0.7 中会有对应的src、conf等文件
46
45
/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf
47
46
```
48
47
+ 3、检测运行端口
49
-
50
48
```
51
49
tinywan@tinywan:/usr/local/redis/etc$ ps -aux | grep redis
52
-
53
50
tinywan 43725 0.1 0.3 38160 6272 ? Ssl 09:11 0:00 /usr/local/redis/bin/redis-server * :63790
54
-
55
51
tinywan 43730 0.0 0.0 15984 1060 pts/4 S+ 09:11 0:00 grep --color=auto redis
56
52
```
57
-
58
53
+ 4、redis-cli启动
59
54
```
60
55
tinywan@tinywan:/usr/local/redis/etc$ redis-cli -h 127.0.0.1 -p 63790
You can’t perform that action at this time.
0 commit comments