在使用 Proxmox VE(简称 pve)
中,添加了新固态等设备后,由于 Predictable Network Interface Names(可预测的网络接口名称)
,网络接口的名称会发生变化,/etc/network/interfaces 中网络接口的配置可能就会对应不上,导致断网等。在 pve 中的 Ubuntu
虚拟机也存在这种情况,需要指名网络接口的一些功能可能会因为网络接口名称的变动而不再工作。因此对于这种情况,可以根据 MAC
地址来固定网络接口的名称。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ensureDir } from 'https://deno.land/std@0.208.0/fs/mod.ts' | |
| import { basename, join } from 'https://deno.land/std@0.208.0/path/mod.ts' | |
| import { $ } from 'npm:zx@8.8.1' | |
| import fg from 'npm:fast-glob@3.3.3' | |
| import { consola } from 'npm:consola@3.2.3' | |
| import dayjs from 'npm:dayjs@1.11.19' | |
| // 从 extractors.ts 导入压缩文件处理函数 | |
| import { extractArchive, isArchiveFile } from './extractors.ts' |
- Make sure dependencies
sudo apt install cifs-utils -y- Create a directory to be mounted
sudo mkdir /mnt/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.github.MuXiu1997.converter; | |
| import org.springframework.core.convert.converter.Converter; | |
| import org.springframework.core.convert.converter.ConverterFactory; | |
| import org.springframework.lang.NonNull; | |
| import java.lang.annotation.Annotation; | |
| import java.lang.reflect.Field; | |
| import java.lang.reflect.Method; | |
| import java.util.Map; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "prependHeader": true, | |
| "maxJsonSize": 400, | |
| "alwaysFold": false, | |
| "alwaysRenderAllContent": false, | |
| "sortKeys": false, | |
| "clickableUrls": true, | |
| "wrapLinkWithAnchorTag": false, | |
| "openLinksInNewWindow": true, | |
| "autoHighlight": true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://www.npmjs.com/package/npm-check | |
| NPM_CHECK_INSTALLER=pnpm npx npm-check -u |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/ | |
| ELECTRON_BUILDER_BINARIES_MIRROR=http://npm.taobao.org/mirrors/electron-builder-binaries/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| root: true, | |
| env: { | |
| node: true, | |
| }, | |
| extends: [ | |
| 'eslint:recommended', | |
| 'plugin:@typescript-eslint/recommended', | |
| 'plugin:vue/vue3-recommended', | |
| 'plugin:prettier/recommended' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GOPROXY=https://goproxy.cn,direct |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -fsSL get.docker.com -o get-docker.sh `# 下载安装脚本` \ | |
| && sudo sh get-docker.sh --mirror Aliyun `# 执行安装脚本` \ | |
| && sudo systemctl enable docker `# 加入开机启动` \ | |
| && sudo systemctl start docker `# 启动docker服务` \ | |
| && sudo groupadd -f docker `# 创建docker组` \ | |
| && sudo usermod -aG docker $USER `# 将当前用户加入docker组` \ | |
| && sudo mkdir -p /etc/docker `# 创建配置目录` \ | |
| && sudo echo -e '{\n "registry-mirrors": ["https://mirror.baidubce.com"]\n}' | sudo tee /etc/docker/daemon.json > /dev/null `# 设置镜像加速` \ | |
| && sudo systemctl daemon-reload `# 重新加载所有系统服务配置` \ | |
| && sudo systemctl restart docker `# 重启docker服务` |