mirror of
https://gitee.com/callmer/pve_toss_notes.git
synced 2026-08-31 14:02:53 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c384d28039 | ||
|
|
8da8fea50c | ||
|
|
d71720766c | ||
|
|
93d6fc0b80 | ||
|
|
f3ca708e55 | ||
|
|
41d08376da | ||
|
|
98b6d79cfe | ||
|
|
904502d9da | ||
|
|
a1eb073c74 |
+7
-5
@@ -47,14 +47,12 @@ cat /etc/apt/sources.list
|
||||
如果希望能更新 CPU 的 `microcode` ,则需要手动添加镜像的 `non-free` 参数,完整系统源示例如下:
|
||||
|
||||
```bash
|
||||
## 输出内容参考:
|
||||
|
||||
deb https://mirrors.ustc.edu.cn/debian bullseye main contrib non-free
|
||||
|
||||
deb https://mirrors.ustc.edu.cn/debian bullseye-updates main contrib non-free
|
||||
|
||||
# security updates
|
||||
deb https://mirrors.ustc.edu.cn/debian-security bullseye-security main contrib non-free
|
||||
deb https://mirrors.ustc.edu.cn/debian-security bullseye-security main contrib non-free
|
||||
```
|
||||
|
||||
此处我放出 Debian Bullseye 的完整镜像源以供参考, **非常不建议** 将 PVE 的系统源替换成完整的 Debian 源,以避免系统故障。
|
||||
@@ -168,7 +166,7 @@ apt dist-upgrade
|
||||
apt update
|
||||
|
||||
## 安装系统软件
|
||||
apt install htop lm-sensors unzip vim tmux unattended-upgrades apt-listchanges powermgmt-base
|
||||
apt install htop lm-sensors unzip vim tmux unattended-upgrades apt-listchanges powermgmt-base
|
||||
|
||||
## 安装网络工具
|
||||
apt install iperf iperf3 iftop ethtool
|
||||
@@ -178,9 +176,13 @@ apt install cpufrequtils
|
||||
|
||||
## 根据CPU厂商安装CPU微码工具
|
||||
apt install intel-microcode (amd64-microcode)
|
||||
|
||||
## 更新 PCI 数据库
|
||||
update-pciids
|
||||
|
||||
```
|
||||
|
||||
其中 `fail2ban` 和 `unattended-upgrades` 为两个服务,后续会对其进行配置。
|
||||
其中 `unattended-upgrades` 为系统自动更新服务,后续会对其进行配置。
|
||||
|
||||
`cpufrequtils` 为 CPU 调度器的配置工具,后续会对 CPU 调度算法进行调整。
|
||||
|
||||
|
||||
+5
-1
@@ -9,7 +9,7 @@
|
||||
apt update
|
||||
|
||||
## 安装系统软件
|
||||
apt install htop lm-sensors unzip vim tmux unattended-upgrades apt-listchanges powermgmt-base
|
||||
apt install htop lm-sensors unzip vim tmux unattended-upgrades apt-listchanges powermgmt-base
|
||||
|
||||
## 安装网络工具
|
||||
apt install iperf iperf3 iftop ethtool
|
||||
@@ -19,6 +19,10 @@ apt install cpufrequtils
|
||||
|
||||
## 根据CPU厂商安装CPU微码工具
|
||||
apt install intel-microcode (amd64-microcode)
|
||||
|
||||
## 更新 PCI 数据库
|
||||
update-pciids
|
||||
|
||||
```
|
||||
|
||||
本文后续命令,均在 SSH 终端下完成。
|
||||
|
||||
+5
-4
@@ -213,12 +213,12 @@ sudo systemctl restart dhcpcd.service
|
||||
|
||||
### 1.5.调整系统内核参数
|
||||
|
||||
由于该 Debian 虚拟机模板将用于克隆内网 DNS 服务器,因此需要调整一部分系统内核参数来简单优化性能。
|
||||
由于该 Debian 虚拟机模板将用于克隆内网 DNS 服务器,因此需要调整一部分系统内核参数来简单优化性能。
|
||||
|
||||
执行以下命令对 `sysctl` 的配置文件进行修改:
|
||||
使用 `nano` 编辑器编辑 **内核参数** 配置文件,执行以下命令:
|
||||
|
||||
```bash
|
||||
## 调整系统内核参数
|
||||
## 编辑 内核参数 配置文件
|
||||
sudo nano /etc/sysctl.d/99-sysctl.conf
|
||||
```
|
||||
|
||||
@@ -238,9 +238,9 @@ net.ipv4.tcp_congestion_control = bbr
|
||||
|
||||
net.ipv4.conf.all.log_martians = 1
|
||||
|
||||
net.ipv4.icmp_ratelimit = 100
|
||||
net.ipv4.igmp_max_memberships = 100
|
||||
|
||||
net.ipv4.tcp_challenge_ack_limit = 1000
|
||||
net.ipv4.tcp_fin_timeout = 30
|
||||
net.ipv4.tcp_keepalive_time = 120
|
||||
net.ipv4.tcp_max_orphans = 4096
|
||||
@@ -249,6 +249,7 @@ net.ipv4.tcp_syncookies = 1
|
||||
|
||||
net.ipv6.conf.all.use_tempaddr = 0
|
||||
net.ipv6.conf.default.use_tempaddr = 0
|
||||
|
||||
```
|
||||
|
||||
保存该配置文件后,重启系统或者执行以下命令让配置生效:
|
||||
|
||||
@@ -11,9 +11,9 @@ net.ipv4.tcp_congestion_control = bbr
|
||||
|
||||
net.ipv4.conf.all.log_martians = 1
|
||||
|
||||
net.ipv4.icmp_ratelimit = 100
|
||||
net.ipv4.igmp_max_memberships = 100
|
||||
|
||||
net.ipv4.tcp_challenge_ack_limit = 1000
|
||||
net.ipv4.tcp_fin_timeout = 30
|
||||
net.ipv4.tcp_keepalive_time = 120
|
||||
net.ipv4.tcp_max_orphans = 4096
|
||||
@@ -22,3 +22,4 @@ net.ipv4.tcp_syncookies = 1
|
||||
|
||||
net.ipv6.conf.all.use_tempaddr = 0
|
||||
net.ipv6.conf.default.use_tempaddr = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user