当前位置: 首页> 汽车> 维修 > 济南建站软件_高能建站系统怎么收费_百度收录站长工具_高端网站建设公司哪家好

济南建站软件_高能建站系统怎么收费_百度收录站长工具_高端网站建设公司哪家好

时间:2025/9/8 7:35:35来源:https://blog.csdn.net/unix2linux/article/details/144839507 浏览次数: 0次
济南建站软件_高能建站系统怎么收费_百度收录站长工具_高端网站建设公司哪家好

在这里插入图片描述
Secret

D:\msys64\home\unix2linux\lua2\redis>echo %DATE%T%TIME%
2024-12-31T 8:55:47.94
D:\msys64\home\unix2linux\lua2\redis>printf "%DATE%%TIME%" | openssl dgst -md5
MD5(stdin)= b40c65cc4796709fea4fb6e370ab355bD:\msys64\home\unix2linux\lua2\redis>uuidgen
e9ce2966-8cf6-4e80-862e-1914261ee784
D:\msys64\home\unix2linux\lua2\redis>uuidgen | openssl dgst -md5
MD5(stdin)= 64763802aba6d3b6e67505659a36b4fdD:\msys64\home\unix2linux\lua2\redis>linux_date +"%s%N"
1735606709895182500
D:\msys64\home\unix2linux\lua2\redis>linux_date +"%s%N" | openssl dgst -md5
MD5(stdin)= e88ac702f6da42dd731179501d5e7aec

在这里插入图片描述
Auth

D:\msys64\home\unix2linux\lua2\redis>redis-cli -a e88ac702f6da42dd731179501d5e7aec
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
127.0.0.1:6379> config get requirepass
1) "requirepass"
2) "e88ac702f6da42dd731179501d5e7aec"
127.0.0.1:6379>

Configure

###############################################################################
requirepass 'e88ac702f6da42dd731179501d5e7aec' 
###############################################################################
dbfilename "dump.rdb"save 900 1
save 300 10
save 60 10000
###############################################################################

Keys

D:\msys64\home\unix2linux\lua2\redis>red
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
127.0.0.1:6379> config get dir
1) "dir"
2) "D:\\msys64\\home\\unix2linux\\lua2\\redis"
127.0.0.1:6379> keys *
(empty array)
127.0.0.1:6379> save
OK
127.0.0.1:6379> flushall
OK
127.0.0.1:6379> ping
PONG

Flush

127.0.0.1:6379> flushdb
OK
127.0.0.1:6379> flushall
OK
127.0.0.1:6379>

Data Dictionary : Run Mode

[{"ID": 0, "Key": "ON", "Value": "running", "Data": "", "Description": ""}, {"ID": 1, "Key": "OFF", "Value": "freezing", "Data": "", "Description": ""}
]

Data Dictionary : Predict Mode

[{"ID": 0, "Key": "YOLO V5", "Value": "yolov5s.pt", "Data": "", "Description": ""}, {"ID": 1, "Key": "Fireworks V1", "Value": "fireworksv1.pt", "Data": "", "Description": ""}
]
127.0.0.1:6379> set data-dictionary:run-mode "[{'ID':0,'Key':'ON','Value':'running','Data':'','Description':''},{'ID':1,'Key':'OFF','Value':'freezing','Data':'','Description':''}]"
OK
127.0.0.1:6379> set data-dictionary:predict-mode "[{'ID':0,'Key':'YOLO V5','Value':'yolov5s.pt','Data':'','Description':''},{'ID':1,'Key':'Fireworks V1','Value':'fireworksv1.pt','Data':'','Description':''}]"
OK
127.0.0.1:6379> save
OK
127.0.0.1:6379> keys *
1) "data-dictionary:predict-mode"
2) "data-dictionary:run-mode"
127.0.0.1:6379> get data-dictionary:run-mode
"[{'ID':0,'Key':'ON','Value':'running','Data':'','Description':''},{'ID':1,'Key':'OFF','Value':'freezing','Data':'','Description':''}]"
127.0.0.1:6379> get data-dictionary:predict-mode
"[{'ID':0,'Key':'YOLO V5','Value':'yolov5s.pt','Data':'','Description':''},{'ID':1,'Key':'Fireworks V1','Value':'fireworksv1.pt','Data':'','Description':''}]"

Data Dictionary List

D:\msys64\home\unix2linux\lua2\redis>curl "http://localhost:9999/api/redis/dictionary/list?master=run-mode&slave=0"
{"code": 0,"msg": "success","data": {"master": "run-mode","slave": "0","token": [{"ID": 0,"Key": "ON","Value": "running","Data": "","Description": ""}]}
}
D:\msys64\home\unix2linux\lua2\redis>curl "http://localhost:9999/api/redis/dictionary/list?master=predict-mode"
{"code": 0,"msg": "success","data": {"master": "predict-mode","slave": "","token": [[{"Data": "","Description": "","ID": 0,"Key": "YOLO V5","Value": "yolov5s.pt"},{"Data": "","Description": "","ID": 1,"Key": "Fireworks V1","Value": "fireworksv1.pt"}]]}
}

Data Dictionary Save

D:\msys64\home\unix2linux\lua2\redis>curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d "{\"ID\":0,\"Name\":\"redis\"}" "http://localhost:9999/api/redis/dictionary/save?master=view-mode"
{"code": 0,"msg": "success","data": {"master": "view-mode","slave": "","body": {"ID": 0,"Name": "redis"}}
}

/api/redis/dictionary/all

location /api/redis/dictionary/all {content_by_lua_block {ngx.header.content_type = 'text/html; charset=utf-8'local args = ngx.req.get_uri_args()local result, ok, err, respond;local cjson = require "cjson.safe"local redis = require "resty.redis";local red = redis:new();ok, err = red:connect("127.0.0.1", 6379);ok, err = red:auth(ngx.var.client_redis_secret)if not ok thenresult = string.format('{"code":1,"msg":"error","data":{"token":"%s","body":[]}}', args['token'])return ngx.say(result)endlocal dictionary = 'data-dictionary'local token = string.format('%s*', dictionary)local keys, err = red:keys(token)local line = '['for i, key in ipairs(keys) doline = line .. '"' .. string.sub(key, (string.len(dictionary) + 2)) .. '",'endline = line .. ']'line = string.gsub(line, ',]', ']')red:close()result = string.format('{"code":0,"msg":"success","data":{"token":"%s","body":%s}}', dictionary, line)return ngx.say(result)}
}

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

关键字:济南建站软件_高能建站系统怎么收费_百度收录站长工具_高端网站建设公司哪家好

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: