From d704a29bb274dda2b8e489391839ed842ff63c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=90=AF=E6=98=8E?= <455043818@qq.com> Date: Mon, 30 Oct 2023 13:47:29 +0800 Subject: [PATCH] =?UTF-8?q?chore:10=E6=9C=8830=E6=97=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/daily/2023-10.md | 18 ++++++ .../2023-10-26-\345\237\271\350\256\255.md" | 55 ++++++++++++++++++- 2 files changed, 72 insertions(+), 1 deletion(-) diff --git a/docs/daily/2023-10.md b/docs/daily/2023-10.md index 0bf1ad03ce..46b554e5e6 100644 --- a/docs/daily/2023-10.md +++ b/docs/daily/2023-10.md @@ -1,3 +1,21 @@ +## 10月30日 +-linux ls 命令 + ``` + // t 根据修改时间排列 + // head -n 只列出10条记录 + ls -lit | head -n 10 + ``` +- redis分布式锁 + - https://juejin.cn/post/7279346413915668535 + - 重复订单的问题 https://juejin.cn/post/7273024681631776829 + - redis分布式缓存 https://juejin.cn/post/7274146202496614458 + - redis集群搭建 https://juejin.cn/post/7293831013318819892 + - 得物redis设计与实现 https://juejin.cn/post/7293778973321936908 + - redis队列 https://juejin.cn/post/7149483006686822430 +- seq日志 + - https://github.com/datalust?q=seq&type=all&language=&sort= + - https://hub.docker.com/r/datalust/seq + - https://github.com/serilog/serilog ## 10月26日 - 导出整个数据库结构和数据的命令 - mysqldump -hxxx.xxx.xxx.xxx -P4006 -uroot -pxxxxxxxx dvsv3>/usr/local/sunlight/sql/dvsv3.sql; diff --git "a/docs/javascript/2023-10-26-\345\237\271\350\256\255.md" "b/docs/javascript/2023-10-26-\345\237\271\350\256\255.md" index a9b9ddc5f8..cb4c6defe4 100644 --- "a/docs/javascript/2023-10-26-\345\237\271\350\256\255.md" +++ "b/docs/javascript/2023-10-26-\345\237\271\350\256\255.md" @@ -94,4 +94,57 @@ kill id SHOW OPEN TABLES where In_use > 0; -```` \ No newline at end of file +```` + + + +##seq日志 +``` +https://github.com/datalust?q=seq&type=all&language=&sort= +https://hub.docker.com/r/datalust/seq +https://github.com/serilog/serilog +``` + +## docker seq日志 +``` +// 安装docker +zypper in docker + +docker -v + +docker pull datalust/seq + +// 设置seq密码 +SeqPwd=$(echo 'sunlight2023' | docker run --rm -i datalust/seq config hash) + +// 设置seq日志存放映射的路径 +/usr/local/sunlight/docker/seq/data + +// 5341 代码里调用的路径 +// 80 查看日志的UI +docker run --name seq -d -e ACCEPT_EULA=Y -e SEQ_FIRSTRUN_ADMINPASSWORDHASH="$SeqPwd" -v /usr/local/sunlight/docker/seq/data:/data --memory=512m --memory-swap=512m -e SEQ_CACHE_SYSTEMRAMTARGET=0 -p 12000:80 -p 5341:5341 datalust/seq + +// nginx 进行配置转发 + netstat -ntlp|grep 12000 + + +// nginx中添加如下转发规则 + location /seq { + proxy_pass http://127.0.0.1:12000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + add_header Cache-Control no-cache; + + # 解决潜在的路径问题 + rewrite ^/seq(/.*)$ $1 break; + } + + // nginx配置完毕后,重启一下nginx + nginx -s reload + + // 创建seq apikey + https://www.cnblogs.com/RainFate/p/16869403.html + +``` \ No newline at end of file