Compare commits

...
9 Commits
Author SHA1 Message Date
狐狸Nomad c384d28039 添加更新 PCI 数据库方法
Signed-off-by: 狐狸Nomad <9463297+callmer@user.noreply.gitee.com>
2023-02-09 08:28:04 +00:00
狐狸Nomad 8da8fea50c 添加更新 PCI 数据库方法
Signed-off-by: 狐狸Nomad <9463297+callmer@user.noreply.gitee.com>
2023-02-09 08:26:51 +00:00
狐狸Nomad d71720766c update 2.PVE初始化配置.md.
Signed-off-by: 狐狸Nomad <9463297+callmer@user.noreply.gitee.com>
2023-01-13 07:12:08 +00:00
狐狸Nomad 93d6fc0b80 update 2.PVE初始化配置.md.
Signed-off-by: 狐狸Nomad <9463297+callmer@user.noreply.gitee.com>
2022-12-10 06:32:03 +00:00
狐狸Nomad f3ca708e55 删除文件 src/Fox_Debian_Server_Modules.conf 2022-12-06 07:34:12 +00:00
狐狸Nomad 41d08376da update 5.PVE制作虚拟机模板.md.
Signed-off-by: 狐狸Nomad <9463297+callmer@user.noreply.gitee.com>
2022-12-06 07:33:44 +00:00
狐狸Nomad 98b6d79cfe update 5.PVE制作虚拟机模板.md.
Signed-off-by: 狐狸Nomad <9463297+callmer@user.noreply.gitee.com>
2022-12-06 07:26:22 +00:00
狐狸Nomad 904502d9da add src/Fox_Debian_Server_Modules.conf.
Signed-off-by: 狐狸Nomad <9463297+callmer@user.noreply.gitee.com>
2022-12-06 07:21:07 +00:00
狐狸Nomad a1eb073c74 update src/Fox_Debian_99_Sysctl.conf.
Signed-off-by: 狐狸Nomad <9463297+callmer@user.noreply.gitee.com>
2022-12-06 07:11:34 +00:00
4 changed files with 19 additions and 11 deletions
+7 -5
View File
@@ -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
View File
@@ -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
View File
@@ -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
```
保存该配置文件后,重启系统或者执行以下命令让配置生效:
+2 -1
View File
@@ -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