chenxin's blog

新年快乐,兔年吉祥,心想事成,万事如意,阖家幸福,愿2023一切美好如期而至![给力][心]

2023-01-21 22:04
监视mysql 执行过的sql语句,类似于sql server 的 sql profile
2023-01-11 17:00

给大伙推荐和RedisDesktopManager很像的另外一个Redis桌面可视化管理工具:AnotherRedisDesktopManager,官方是说速度更快,不容易崩溃,我用了下感觉还不错,推荐给大家

官方地址:https://github.com/qishibo/AnotherRedisDesktopManager

2023-01-11 15:20

windows 日期和时间格式化命令行分享

https://stackoverflow.com/questions/51841902/get-time-as-hhmmss-in-windows-batch-file 这篇文章说明了如何在windows 命令行中格式化时间的时候小于10点以前的数字,如何保证自动在前面插入0的方法

https://stackoverflow.com/questions/1192476/format-date-and-time-in-a-windows-batch-script 这篇文章说明了如何在windows命令行中格式化日期和时间。


2022-12-23 09:44

linux 下除了 du 命令之外,还可以用 ncdu 快速查找出磁盘上各个目录下文件所占大小。

需要注意的是:ncdu 是一个第三方包,需要安装后才可以使用。

2022-12-22 10:08

ngxin https 反向代理 asp.net core 站点http请求,总是自动跳转到http请求的解决方案,大神提供了解决方式。

除了做下面这个设置之外,还要记得nginx 转发配置中配置以下这些头,另外asp.net core 中间件:AddHttpLoging https://learn.microsoft.com/en-us/aspnet/core/fundamentals/http-logging/?view=aspnetcore-7.0 排查这类问题时很有帮助,我正是因为这个中间件记录的日志来找到这个问题的根源,这个中间件可以记录http 请求头信息之类的,日志中出现了一个:Unknown proxy: XXX.XXX.XXX.XXX,让我找到了以下这个解决问题的答案。

问题其实也很简答,就是 asp.net core kestrel 服务器默认只识别转发的请求头中IP为:127.0.0.1的代理服务器的IP地址,而nginx 转发的是服务器的本机实际的IP地址,因此这个问题是因为asp.net core kestrel服务器无法正确识别代理服务器IP而导致的问题,按照如下方式,把代理服务器的IP限制去除就好啦。

        proxy_http_version 1.1;
        proxy_set_header   Upgrade $http_upgrade;
        proxy_set_header   Connection keep-alive;
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   Host $host;
        proxy_cache_bypass $http_upgrade;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Proto $scheme;
        proxy_redirect off;



    services.Configure(options =>
    {
        options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | 
            ForwardedHeaders.XForwardedProto;
        // Only loopback proxies are allowed by default.
        // Clear that restriction because forwarders are enabled by explicit 
        // configuration.
        options.KnownNetworks.Clear();
        options.KnownProxies.Clear();
    });


2022-12-21 19:55
如何往已经存在的docker容器实例动态添加一个数据卷。
2022-12-21 13:37

influxdb 1.8.10 linux 版本下载地址。

安装的时候如果报以下错误:

dpkg: error processing archive influxdb_1.8.10_amd64.deb (--install):

 trying to overwrite '/usr/bin/influx', which is also in package influxdb-client 1.6.4-1+deb10u1ubuntu0.1

dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

Synchronizing state of influxdb.service with SysV service script with /lib/systemd/systemd-sysv-install.

Executing: /lib/systemd/systemd-sysv-install disable influxdb

Unit /etc/systemd/system/influxdb.service is masked, ignoring.

Processing triggers for man-db (2.9.1-1) ...

Errors were encountered while processing:

那么执行命令:apt-get remove influxdb-client 删除包: influxdb-client  再安装即可。

 同时执行:rm -f /etc/systemd/system/influxdb.service

2022-12-21 09:45

mysql 8.0 改变root账号的密码。

遇到密码设置失败的情况下,请参考下面文章。

https://www.jianshu.com/p/01d80d3a3659

2022-12-20 18:37
今天一大早到公司就看到人事在消毒,心想肯定有人阳了,心里瞬间很恐惧,虽说现在放开了,但还是希望身边的亲人,朋友,同事大家都能平平安安度过疫情,因为只有他们都没事,自己才安全,才能更好的保护家人,希望大家接下来都能平平安安度过每一天,也希望自己能被幸运之神眷顾![给力]
2022-12-19 21:41
{{item.shareTime}}
首页 上一页 13 14 15 16 17 下一页 末页 共41页
正在加载,请稍后... 已经到底啦~~~
文章归档 网站地图 闽ICP备2020021271号-1 百度统计