2023年09月06日
我想问一个老生常谈的问题,如何可以保证程序优雅的退出,这里用 优雅 的目的是因为我想在退出之前做一些小动作。用户场景:希望在程序退出之前可以从 Consul 上解注册, 下面是我的模板代码。public static IWebHostBuilder CreateWebHostBuilder(stri
阅读全文
2023年08月21日
一、使用virtualenv使用pippip install virtualenv创建运行环境virtualenv [虚拟环境名称]virtualenv venv#如果不想使用系统的包,加上–no-site-packeages参数virtualenv --no-site-packages 创建路径
阅读全文
2023年08月21日
1)查看防火墙状态sudo ufw status verbose2)开放指定端口如需要开放80和443端口,如下:sudo ufw allow 80/tcpsudo ufw allow 443/tcpsudo ufw reload3)常用命令ufw status 查看防火墙状态ufw enable
阅读全文
2023年07月27日
sudo dhclient -6 -r //释放ipv6地址sudo dhclient -6 //重新获取ipv6地址sudo service networking restart //重启网络服务
阅读全文
2023年06月19日
设置docker开机启动systemctl enable docker.service设置容器自动启动对于新容器,创建时添加参数--restart=always对于已创建容器,需要使用update命令docker update --restart=always <容器名>
阅读全文
2023年06月15日
cd /var/lib/vz/template/isoqm importdisk 105 openwrt-x86-64-generic-squashfs-combined-efi.img local-lvm
阅读全文
2023年06月06日
问题:git clone的时候,报错gnutls_handshake() failed: The TLS connection was non-properly terminated.原因:代理设置出错解决方案:重置代理git config --global --unset https.https
阅读全文
2023年05月23日
下载文件 wget https://github.com/filebrowser/filebrowser/releases/download/v2.23.0/linux-amd64-filebrowser.tar.gz解压tar -zxvf linux-amd64-filebrowser.tar.g
阅读全文
2023年05月16日
dpkg-reconfigure locales
阅读全文
2023年05月13日
0 初始化一个新文件夹为仓库(没有.git目录)mkdir dotnetcoreadmincd dotnetcoreadmingit inittouch README.mdgit add README.mdgit commit -m "first commit"git remot
阅读全文