Fish-Shell编译安装

1.安装依赖 sudo apt update sudo apt install build-essential cmake ncurses-dev 2.下载fish wget https://github.com/fish-shell/fish-shell/releases/download/3.7.1/fish-3.7.1.tar.xz tar -xf fish-3.7.1.tar.xz cd fish-3.7.1 3.编译安装 Fish make sudo make install 4.验证安装 fish --version 5.设置fish为默认 shell 确认 Fish 的路径 which fish 6.将Fish路径添加到 /etc/shells echo "/usr/bin/fish" | sudo tee -a /etc/shells 7.更改默认 shell chsh -s /usr/local/bin/fish 8.重新登录 退出当前会话并重新登录,或者重启终端,以使更改生效 9.验证更改 echo $SHELL

August 6, 2024 · 1 min · ming

Ubuntu安装NVIDIA驱动

1.更新系统 sudo apt update sudo apt upgrade 2.搜索并安装适用的驱动 sudo ubuntu-drivers devices 3.选择并安装推荐的驱动程序和设置DKMS密码 sudo apt install nvidia-driver-xxx 4.列出所有与NVIDIA相关的已安装包 dpkg -l | grep -i nvidia 5.重启系统 sudo reboot 6.DKMS密钥 选择 Enroll MOK 选择 Continue 选择 Yes 输入 密码 重启 7.验证驱动程序是否正确安装 nvidia-smi 每秒更新一次 GPU 状态 watch -n 1 nvidia-smi 8.禁用安全启动(可选) 装完驱动发现无法使用 nvidia-smi 命令,并提示以下内容 NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running. 这时候,可以试试关闭虚拟机的安全启动,原因是因为驱动签名验证无法通过 ...

August 5, 2024 · 1 min · ming

PVE独显直通

在 Proxmox VE 上进行独立显卡直通(GPU passthrough)操作,可以将物理显卡直接分配给虚拟机,从而提升虚拟机的图形性能。 前提条件 硬件支持:确保你的 CPU 和主板支持 IOMMU(Intel VT-d 或 AMD-Vi) BIOS 设置:在 BIOS 中启用 IOMMU 和相关设置(Intel VT-d 或 AMD-Vi) 硬件环境: CPU: AMD Ryzen 5 3600X Motherboard: MSI MAG B550M GPU: Nvidia 1650S 1.更改BIOS设置 重置BIOS为默认设置 Settings\Save & Exit\Restore Defaults 关闭S/3Modern Standby Support(可选) Settings\Advanced\ACPI Settings\S/3Modern Standby Support [Disabled] 设置Initiate Graphic Adaptor为外置显卡 Settings\Advanced\Initiate Graphic Configuration\Initiate Graphic Adaptor [PEG] 设置Integrated Graphics为Force Mode Settings\Advanced\Initiate Graphic Configuration\Integrated Graphics [Force] 打开主板IOMMU Overclocking\Advanced CPU Configuration\AMD CBS\IOMMU [Enabled] 打开CPU虚拟化 Overclocking\Advanced CPU Configuration\SVM Mode [Enabled] 2.启用 IOMMU 编辑 /etc/default/grub 文件,找到 GRUB_CMDLINE_LINUX_DEFAULT 行,并添加 ...

August 5, 2024 · 1 min · ming

Tmux编译安装

1.准备编译环境和依赖项 编译工具(如make、gcc等) libevent 库及其开发文件 ncurses 库及其开发文件 bison 库及其开发文件 2.安装依赖 sudo apt update sudo apt install -y build-essential libevent-dev ncurses-dev bison 3.下载tmux wget https://github.com/tmux/tmux/releases/download/3.4/tmux-3.4.tar.gz tar xf tmux-3.4.tar.gz cd tmux-3.4 4.编译和安装 ./configure make sudo make install 5.验证安装 tmux -V 6.设置tmux配置文件(可选) 可以创建一个自定义的tmux配置文件 ~/.tmux.conf 来设置个性化的tmux配置选项

August 5, 2024 · 1 min · ming

NginxProxyManager使用CloudFlareDNS申请通配符证书报错

CommandError: The 'certbot_dns_cloudflare._internal.dns_cloudflare' plugin errored while loading: No module named 'CloudFlare'. You may need to remove or update this plugin. The Certbot log will contain the full error details and this should be reported to the plugin developer. Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/certbot-log-96d_o1x7/log or re-run Certbot with -v for more details. The 'certbot_dns_cloudflare._internal.dns_cloudflare' plugin errored while loading: No module named 'CloudFlare'. You may need to remove or update this plugin. The Certbot log will contain the full error details and this should be reported to the plugin developer. Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/certbot-log-np08pe1n/log or re-run Certbot with -v for more details. ERROR: Could not find a version that satisfies the requirement acme== (from versions: 0.0.0.dev20151006, 0.0.0.dev20151008, 0.0.0.dev20151017, 0.0.0.dev20151020, 0.0.0.dev20151021, 0.0.0.dev20151024, 0.0.0.dev20151030, 0.0.0.dev20151104, 0.0.0.dev20151107, 0.0.0.dev20151108, 0.0.0.dev20151114, 0.0.0.dev20151123, 0.0.0.dev20151201, 0.1.0, 0.1.1, 0.2.0, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.11.1, 0.12.0, 0.13.0, 0.14.0, 0.14.1, 0.14.2, 0.15.0, 0.16.0, 0.17.0, 0.18.0, 0.18.1, 0.18.2, 0.19.0, 0.20.0, 0.21.0, 0.21.1, 0.22.0, 0.22.1, 0.22.2, 0.23.0, 0.24.0, 0.25.0, 0.25.1, 0.26.0, 0.26.1, 0.27.0, 0.27.1, 0.28.0, 0.29.0, 0.29.1, 0.30.0, 0.30.1, 0.30.2, 0.31.0, 0.32.0, 0.33.0, 0.33.1, 0.34.0, 0.34.1, 0.34.2, 0.35.0, 0.35.1, 0.36.0, 0.37.0, 0.37.1, 0.37.2, 0.38.0, 0.39.0, 0.40.0, 0.40.1, 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.10.0, 1.10.1, 1.11.0, 1.12.0, 1.13.0, 1.14.0, 1.15.0, 1.16.0, 1.17.0, 1.18.0, 1.19.0, 1.20.0, 1.21.0, 1.22.0, 1.23.0, 1.24.0, 1.25.0, 1.26.0, 1.27.0, 1.28.0, 1.29.0, 1.30.0, 1.31.0, 1.32.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.8.0, 2.9.0, 2.10.0, 2.11.0) ERROR: No matching distribution found for acme== [notice] A new release of pip is available: 24.0 -> 24.1.1 [notice] To update, run: pip install --upgrade pip at /app/lib/utils.js:16:13 at ChildProcess.exithandler (node:child_process:430:5) at ChildProcess.emit (node:events:518:28) at maybeClose (node:internal/child_process:1105:16) at ChildProcess._handle.onexit (node:internal/child_process:305:5) 这个错误提示表明在加载 certbot_dns_cloudflare 插件时遇到了问题,具体来说是缺少 CloudFlare 模块要安装这个模块并确保所有相关插件和依赖项都是最新的 ...

June 30, 2024 · 2 min · ming

NginxProxyManager使用CloudFlareDNS申请通配符证书报错

CommandError: The 'certbot_dns_cloudflare._internal.dns_cloudflare' plugin errored while loading: No module named 'CloudFlare'. You may need to remove or update this plugin. The Certbot log will contain the full error details and this should be reported to the plugin developer. Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/certbot-log-96d_o1x7/log or re-run Certbot with -v for more details. The 'certbot_dns_cloudflare._internal.dns_cloudflare' plugin errored while loading: No module named 'CloudFlare'. You may need to remove or update this plugin. The Certbot log will contain the full error details and this should be reported to the plugin developer. Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/certbot-log-np08pe1n/log or re-run Certbot with -v for more details. ERROR: Could not find a version that satisfies the requirement acme== (from versions: 0.0.0.dev20151006, 0.0.0.dev20151008, 0.0.0.dev20151017, 0.0.0.dev20151020, 0.0.0.dev20151021, 0.0.0.dev20151024, 0.0.0.dev20151030, 0.0.0.dev20151104, 0.0.0.dev20151107, 0.0.0.dev20151108, 0.0.0.dev20151114, 0.0.0.dev20151123, 0.0.0.dev20151201, 0.1.0, 0.1.1, 0.2.0, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.11.1, 0.12.0, 0.13.0, 0.14.0, 0.14.1, 0.14.2, 0.15.0, 0.16.0, 0.17.0, 0.18.0, 0.18.1, 0.18.2, 0.19.0, 0.20.0, 0.21.0, 0.21.1, 0.22.0, 0.22.1, 0.22.2, 0.23.0, 0.24.0, 0.25.0, 0.25.1, 0.26.0, 0.26.1, 0.27.0, 0.27.1, 0.28.0, 0.29.0, 0.29.1, 0.30.0, 0.30.1, 0.30.2, 0.31.0, 0.32.0, 0.33.0, 0.33.1, 0.34.0, 0.34.1, 0.34.2, 0.35.0, 0.35.1, 0.36.0, 0.37.0, 0.37.1, 0.37.2, 0.38.0, 0.39.0, 0.40.0, 0.40.1, 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.10.0, 1.10.1, 1.11.0, 1.12.0, 1.13.0, 1.14.0, 1.15.0, 1.16.0, 1.17.0, 1.18.0, 1.19.0, 1.20.0, 1.21.0, 1.22.0, 1.23.0, 1.24.0, 1.25.0, 1.26.0, 1.27.0, 1.28.0, 1.29.0, 1.30.0, 1.31.0, 1.32.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.8.0, 2.9.0, 2.10.0, 2.11.0) ERROR: No matching distribution found for acme== [notice] A new release of pip is available: 24.0 -> 24.1.1 [notice] To update, run: pip install --upgrade pip at /app/lib/utils.js:16:13 at ChildProcess.exithandler (node:child_process:430:5) at ChildProcess.emit (node:events:518:28) at maybeClose (node:internal/child_process:1105:16) at ChildProcess._handle.onexit (node:internal/child_process:305:5) 这个错误提示表明在加载 certbot_dns_cloudflare 插件时遇到了问题,具体来说是缺少 CloudFlare 模块要安装这个模块并确保所有相关插件和依赖项都是最新的 ...

June 30, 2024 · 2 min · ming

搭建FRP内网穿透

frp 主要由两个组件组成:服务端(frps) 和 客户端(frpc)。通常情况下,服务端部署在具有公网 IP 地址的机器上,而客户端部署在需要穿透的内网服务所在的机器上。 服务端 Linux 方式一 1.下载 frp 版本根据自己情况选择,然后通过FTP上传到服务器 或者也可以使用wget下载 wget https://github.com/fatedier/frp/releases/download/v0.51.3/frp_0.55.1_linux_amd64.tar.gz 2.解压 tar -zxvf frp_0.55.1_linux_amd64.tar.gz 3.重命名并进入该目录 mv frp_0.55.1_linux_amd64 frp cd frp ls 有以下文件 LICENSE frpc frpc.toml frps frps.toml 4.编辑 frps.toml bindPort = 7000 # frp服务器用于接收客户端连接的端口 auth.method = "token" auth.token = "xxxxxxx" # 身份认证 更多配置示例请参考官方文档 5.运行 ./frps -c ./frps.toml 如果需要在后台长期运行,建议结合其他工具,如 systemd 创建 frps.service 文件 sudo vim /etc/systemd/system/frps.service 添加以下内容 # 服务名称,可自定义 Description = frp server After = network.target syslog.target Wants = network.target [Service] Type = simple # 启动frps的命令,需修改为您的frps的安装路径 ExecStart = /path/to/frps -c /path/to/frps.toml [Install] WantedBy = multi-user.target 使用 systemd 命令管理 frps 服务 ...

March 27, 2024 · 2 min · ming