宵待夜雨的博客

Ubuntu允许root登录

在 Ubuntu 系统中,默认出于安全考虑禁用 root 用户直接登录

徐智军 Published on 2026-01-15

k3s证书过期轮换

查看 k3s 是否处于健康状态 先看看 server 端日志: sudo journalctl -u k3s -f 如果看到: x509: certificate has expired or is not yet valid tls: failed to verify client certif

徐智军 Published on 2025-12-02

PVE安装Guest Agent

sudo apt-get update && sudo apt-get install qemu-guest-agent sudo systemctl start qemu-guest-agent && sudo systemctl enable qemu-guest-agent

徐智军 Published on 2025-07-31

k8s Ingress 获取真实IP

apiVersion: v1 data: use-forwarded-headers: 'true' # 主要配置 proxy-real-ip-cidr: 0.0.0.0/0 # 备选 kind: ConfigMap metadata: annotations: {} labels:

徐智军 Published on 2025-07-30

Ubuntu常用命令

修改镜像源 https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ 安装SSH sudo apt update sudo apt install openssh-server sudo systemctl start ssh sudo systemctl

徐智军 Published on 2025-06-19

使用 PowerShell 删除指定目录及其所有子目录下大小为 0 的文件

Get-ChildItem -Recurse -File | Where-Object {$_.Length -eq 0} | Remove-Item Get-ChildItem -Recurse -File | Where-Object { $_.Length -eq 334 } | Remove

徐智军 Published on 2025-06-07

将当前目录jpg后缀改为png

当前目录修改 Get-ChildItem *.jpg | Rename-Item -NewName { $_.Name -replace '\.jpg$', '.png' } 当前目录及其所有子文件 Get-ChildItem -Path . -Recurse -Filter *.jpg | Ren

徐智军 Published on 2025-05-26

windows快速删除所有node_modules文件夹

Get-ChildItem -Path F:\HsxWorkpace -Recurse -Force -Directory -Filter 'node_modules' | Remove-Item -Recurse -Force

徐智军 Published on 2025-05-07
PVE

Proxmox VE pve硬盘直通

Proxmox VE直通硬盘相对简单。有2种方式的实现。 1、RDM (裸磁盘映射) RDM是引用于VMware的裸磁盘映射。 参考https://kb.vmware.com/s/article/1017530?lang=zh_CN。 将单个硬盘或者分区,通过qemu进行映射到虚拟机。在KVM上没有

徐智军 Published on 2024-11-18
PVE

一键给PVE增加温度,cpu功耗频率,硬盘等信息

脚本自动检测:一键给PVE增加温度和cpu频率显示,NVME,机械固态硬盘信息 理论上适合任何设备 自动适配传感器数据 自动检测NVME硬盘数量 自动检测机械,固态硬盘数量 自动检测CPU核心数量

徐智军 Published on 2024-11-18
Previous Next