update PVE初始化配置.md.

This commit is contained in:
秋刀狐狸
2022-07-20 05:19:47 +00:00
committed by Gitee
parent 82dd67e9b0
commit 648ee38c22
2 changed files with 71 additions and 3 deletions
+68
View File
@@ -95,6 +95,8 @@ rm -rvf *.list
创建PVE免费源:
**注意:该命令为两行,在输入时请逐行输入并回车执行**
```bash
## 创建PVE免费源
@@ -123,3 +125,69 @@ deb https://mirrors.ustc.edu.cn/proxmox/debian/pve bullseye pve-no-subscription
如果需要使用 Proxmox 网页端下载 CT Templates,可以替换 CT Templates 的源。
该功能我未使用,因此只做记录:
```bash
## 替换 CT Templates 源
cp /usr/share/perl5/PVE/APLInfo.pm /usr/share/perl5/PVE/APLInfo.pm.bak
sed -i 's|http://download.proxmox.com|https://mirrors.ustc.edu.cn/proxmox|g' /usr/share/perl5/PVE/APLInfo.pm
```
### 1.4.替换后操作
更换完成系统源之后,需要更新系统源的同步:
```bash
## 清理
apt clean && apt autoclean
## 同步
apt update
```
考虑到“离线”安装时无法同步系统源,因此该步骤可以等到 PVE 中安装好了 RouterOS 软路由或其他路由系统并正确连接 Internet 后再执行。
或者家庭网络环境中还有一个 172.16.1.0/24 网段的,已经连接 Internet 的路由器 A。将路由器 A 的LAN 口与 PVE 的管理网口连接,此时 PVE 可访问外网。
## 2.安装必要软件
安装软件前,同样要让 PVE 能够访问外网。
```bash
## 同步镜像仓库
apt update
## 安装系统软件
apt install htop lm-sensors neofetch fail2ban vim tmux unattended-upgrades powermgmt-base
## 安装网络工具
apt install iperf iperf3 iftop net-tools ethtool
## 安装CPU调度调整工具
apt install cpufrequtils
```
其中 “fail2ban” 和 “unattended-upgrades” 为两个服务,后续会对其进行配置。
“cpufrequtils” 为 CPU 调度器的配置工具,后续会对 CPU 调度算法进行调整。
## 3.配置PVE网桥和管理网口
设置电脑的 IP 地址为静态 IP ,IP 地址段与 PVE 的 IP 地址段保持一致。
用网线将电脑的网口与 PVE 的管理网口,此时应该为编号最小的第一个网口,相连接。
访问 PVE 的 WEB 管理界面,对 PVE 的网络进行一些调整。
![PVE网络规划](img/pve_net_schematization.png)
在设置 PVE 的网络之前,需要对网络内部结构做一个规划。
在前篇的网络地址段规划时,我们有如下规划内容:
- PVE IP172.16.1.250/24
- PVE 网关:172.16.1.1
- PVE DNS172.16.1.1
Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB