Compare commits

...
4 Commits
Author SHA1 Message Date
CallMeR 126635206a 优化 DNS 配置参数 2026-08-26 00:00:40 +08:00
CallMeR d3715eaf4e 移除过时 Btrfs 部分 2026-08-21 17:32:16 +08:00
CallMeR 66df985278 优化文案描述 2026-08-20 10:17:15 +08:00
CallMeR dfb4a767a8 修复包顺序 2026-08-19 16:47:30 +08:00
10 changed files with 15 additions and 73 deletions
+2 -6
View File
@@ -124,14 +124,10 @@ Microsoft 官方终端工具,可以在 Github 平台或 Microsoft 应用商店
此时会出现 `Target Harddisk` 选项,会显示出设备中存在的硬盘列表,可通过下拉框选择安装 PVE 的目标硬盘。
如需修改文件系统参数,可点击目标硬盘右侧的 `Options` 菜单。若无特殊要求,建议保持系统默认配置。
![PVE选择安装硬盘](img/p01/pve_hd_choose.jpg)
点击硬盘列表右侧的 `Options` ,对 PVE 的硬盘安装参数进行一些调整。
推荐将 `Filesystem` 也就是硬盘的文件系统,设置成 `xfs`
![PVE文件系统](img/p01/pve_hd_fs.jpg)
### 1.4. PVE 时区选项
此时 PVE 处于未联网的 “离线” 状态,因此不会从互联网中读取时区信息,需要手动设置时区。
+1 -1
View File
@@ -160,7 +160,7 @@ $ apt full-upgrade
$ apt update
## 安装系统软件
$ apt install btop curl knot-dnsutils lm-sensors neovim powermgmt-base unattended-upgrades sshguard tmux
$ apt install btop curl knot-dnsutils lm-sensors neovim powermgmt-base sshguard tmux unattended-upgrades
## 安装 CPU 调度调整工具
$ apt install linux-cpupower
+1 -55
View File
@@ -472,61 +472,7 @@ $ find /sys/kernel/iommu_groups/ -type l
/sys/kernel/iommu_groups/9/devices/0000:00:14.1
```
## 5. BTRFS 调整
**额外说明:**
- 本节专为 `BTRFS` 单盘 `RAID0`(条带模式)安装的 PVE 系统设计,使用其他安装模式时,请跳过此节
- `BTRFS` 文件系统当前仍为技术预览状态,请谨慎操作
- 有关在 PVE 中使用 `BTRFS` 的详情,请参阅 [Proxmox VE - BTRFS](https://pve.proxmox.com/wiki/BTRFS)
安装 PVE 时,若使用了 `BTRFS` 单盘 `RAID0` 的安装模式,系统默认未启用 swap 和 zstd 压缩,需要手动开启。
通常情况下,内存与 swap 的 **推荐** 比例为 `1:1` 。本机具有 `16GB` 内存,因此设置 `16GB` swap 空间。
执行以下命令,在 `BTRFS` 文件系统中创建子卷,并配置激活 swapfile 。
```bash
## 创建用于存放交换文件的子卷
$ btrfs subvolume create /swap
## 在子卷中创建 16GB 的交换文件
$ btrfs filesystem mkswapfile --size 16g --uuid clear /swap/swapfile
## 激活交换文件
$ swapon /swap/swapfile
```
此时还需进一步修改系统的 `fstab` 配置文件,以启用 `BTRFS` 的 zstd 压缩功能并确保 swap 在系统启动时自动激活。
```bash
## 编辑 fstab 配置文件
$ editor /etc/fstab
```
`fstab` 为系统关键配置文件,直接影响系统启动,修改此文件时,请注意以下几点:
- 仅修改根目录 `/` 对应的挂载选项,添加 `compress=zstd` 参数。
- 在文件末尾新增一行,添加 swap 的自动挂载。
-**不要** 修改其余配置参数,尤其是设备的唯一标识符( `UUID` ),切勿修改。
修改完成后,示例如下。
```bash
#### 系统 fstab 示例配置
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=<DO-NOT-EDIT-YOUR-UUID> / btrfs defaults,compress=zstd 0 1
UUID=<YOUR-UUID> /boot/efi vfat defaults 0 1
proc /proc proc defaults 0 0
/swap/swapfile none swap defaults 0 0
```
## 6.系统清理
## 5.系统清理
PVE 系统配置完成后,可执行以下命令,对系统进行清理。
+3 -2
View File
@@ -102,6 +102,8 @@ $ sudo tee /etc/systemd/resolved.conf.d/10-server-dns.conf >/dev/null <<'EOF'
DNS=127.0.0.1
DNS=::1
DNSStubListener=no
LLMNR=no
MulticastDNS=no
EOF
```
@@ -383,7 +385,7 @@ server-https https://doh.360.cn/dns-query -fallback
```
`SmartDNS` 主配置文件配置完成后,执行以下命令修正文件权限
`SmartDNS` 主配置文件配置完成后,执行以下命令修正文件权限
```bash
## 修正 SmartDNS 主配置文件权限
@@ -436,7 +438,6 @@ no-hosts
no-ident
no-resolv
no-round-robin
rebind-localhost-ok
stop-dns-rebind
rebind-domain-ok=/fox.internal/
+4 -3
View File
@@ -443,6 +443,8 @@ $ sudo tee /etc/systemd/resolved.conf.d/10-server-dns.conf >/dev/null <<'EOF'
DNS=127.0.0.1
DNS=::1
DNSStubListener=no
LLMNR=no
MulticastDNS=no
EOF
```
@@ -519,9 +521,8 @@ no-hosts
no-ident
no-resolv
no-round-robin
rebind-localhost-ok
stop-dns-rebind
rebind-domain-ok=/fox.internal/
rebind-domain-ok=/fox.internal/ts.net/
# DNS Filter
@@ -539,8 +540,8 @@ local=/test/
# DNS Server
server=/ts.net/100.100.100.100
server=/fox.internal/172.16.1.1
server=/ts.net/100.100.100.100
server=172.16.1.1
```
Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 KiB

After

Width:  |  Height:  |  Size: 464 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 KiB

After

Width:  |  Height:  |  Size: 474 KiB

-1
View File
@@ -19,7 +19,6 @@ no-hosts
no-ident
no-resolv
no-round-robin
rebind-localhost-ok
stop-dns-rebind
rebind-domain-ok=/fox.internal/
+2 -3
View File
@@ -19,9 +19,8 @@ no-hosts
no-ident
no-resolv
no-round-robin
rebind-localhost-ok
stop-dns-rebind
rebind-domain-ok=/fox.internal/
rebind-domain-ok=/fox.internal/ts.net/
# DNS Filter
@@ -39,7 +38,7 @@ local=/test/
# DNS Server
server=/ts.net/100.100.100.100
server=/fox.internal/172.16.1.1
server=/ts.net/100.100.100.100
server=172.16.1.1