Archived
更新 PVE 初始化配置
This commit is contained in:
+24
-24
@@ -16,13 +16,13 @@
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
## 进入系统软件源配置文件目录
|
## 进入系统软件源配置文件目录
|
||||||
cd /etc/apt
|
$ cd /etc/apt
|
||||||
|
|
||||||
## 查看系统默认镜像配置
|
## 查看系统默认镜像配置
|
||||||
cat sources.list
|
$ cat sources.list
|
||||||
|
|
||||||
## 将默认软件源配置文件进行备份
|
## 将默认软件源配置文件进行备份
|
||||||
cp sources.list sources.list.bak
|
$ cp sources.list sources.list.bak
|
||||||
```
|
```
|
||||||
|
|
||||||
系统默认镜像配置记录如下。
|
系统默认镜像配置记录如下。
|
||||||
@@ -43,9 +43,9 @@ deb http://security.debian.org bookworm-security main contrib
|
|||||||
```bash
|
```bash
|
||||||
## 替换系统软件仓库
|
## 替换系统软件仓库
|
||||||
|
|
||||||
sed -i 's|^deb http://ftp.debian.org|deb https://mirrors.ustc.edu.cn|g' /etc/apt/sources.list
|
$ sed -i 's|^deb http://ftp.debian.org|deb https://mirrors.ustc.edu.cn|g' /etc/apt/sources.list
|
||||||
|
|
||||||
sed -i 's|^deb http://security.debian.org|deb https://mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list
|
$ sed -i 's|^deb http://security.debian.org|deb https://mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -70,10 +70,10 @@ deb https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
## 进入订阅源目录
|
## 进入订阅源目录
|
||||||
cd /etc/apt/sources.list.d
|
$ cd /etc/apt/sources.list.d
|
||||||
|
|
||||||
## 删除该目录下的所有配置
|
## 删除该目录下的所有配置
|
||||||
rm -rvf *.list
|
$ rm -rvf *.list
|
||||||
```
|
```
|
||||||
|
|
||||||
创建 PVE 免费源:
|
创建 PVE 免费源:
|
||||||
@@ -83,26 +83,26 @@ rm -rvf *.list
|
|||||||
```bash
|
```bash
|
||||||
## 创建 PVE 免费源
|
## 创建 PVE 免费源
|
||||||
|
|
||||||
source /etc/os-release
|
$ source /etc/os-release
|
||||||
|
|
||||||
echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/ceph-quincy $VERSION_CODENAME no-subscription" > /etc/apt/sources.list.d/ceph-no-subscription.list
|
$ echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/ceph-quincy $VERSION_CODENAME no-subscription" > /etc/apt/sources.list.d/ceph-no-subscription.list
|
||||||
|
|
||||||
echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/pve $VERSION_CODENAME pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
|
$ echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/pve $VERSION_CODENAME pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
|
||||||
```
|
```
|
||||||
|
|
||||||
创建完成后对其进行检查。
|
创建完成后对其进行检查。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
## 检查PVE免费源
|
## 检查PVE免费源
|
||||||
cat /etc/apt/sources.list.d/ceph-no-subscription.list
|
$ cat /etc/apt/sources.list.d/ceph-no-subscription.list
|
||||||
|
|
||||||
cat /etc/apt/sources.list.d/pve-no-subscription.list
|
$ cat /etc/apt/sources.list.d/pve-no-subscription.list
|
||||||
```
|
```
|
||||||
|
|
||||||
如果输出结果中有 USTC 的镜像地址,则表示命令已经正确执行。
|
如果输出结果中有 USTC 的镜像地址,则表示命令已经正确执行。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
## 输出内容参考:
|
## PVE 免费源示例输出
|
||||||
|
|
||||||
## Ceph
|
## Ceph
|
||||||
deb https://mirrors.ustc.edu.cn/proxmox/debian/ceph-quincy bookworm no-subscription
|
deb https://mirrors.ustc.edu.cn/proxmox/debian/ceph-quincy bookworm no-subscription
|
||||||
@@ -120,9 +120,9 @@ deb https://mirrors.ustc.edu.cn/proxmox/debian/pve bookworm pve-no-subscription
|
|||||||
```bash
|
```bash
|
||||||
## 替换 CT Templates 源
|
## 替换 CT Templates 源
|
||||||
|
|
||||||
cp /usr/share/perl5/PVE/APLInfo.pm /usr/share/perl5/PVE/APLInfo.pm.bak
|
$ 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
|
$ sed -i 's|http://download.proxmox.com|https://mirrors.ustc.edu.cn/proxmox|g' /usr/share/perl5/PVE/APLInfo.pm
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -134,13 +134,13 @@ sed -i 's|http://download.proxmox.com|https://mirrors.ustc.edu.cn/proxmox|g' /us
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
## 清理软件包
|
## 清理软件包
|
||||||
apt clean && apt autoclean && apt autoremove --purge
|
$ apt clean && apt autoclean && apt autoremove --purge
|
||||||
|
|
||||||
## 同步软件源
|
## 同步软件源
|
||||||
apt update
|
$ apt update
|
||||||
|
|
||||||
## 更新系统
|
## 更新系统
|
||||||
apt dist-upgrade
|
$ apt dist-upgrade
|
||||||
```
|
```
|
||||||
|
|
||||||
## 2.安装必要软件
|
## 2.安装必要软件
|
||||||
@@ -155,22 +155,22 @@ apt dist-upgrade
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
## 同步镜像仓库
|
## 同步镜像仓库
|
||||||
apt update
|
$ apt update
|
||||||
|
|
||||||
## 安装系统软件
|
## 安装系统软件
|
||||||
apt install htop lm-sensors unzip vim tmux unattended-upgrades powermgmt-base
|
$ apt install htop lm-sensors unzip vim tmux unattended-upgrades powermgmt-base
|
||||||
|
|
||||||
## 安装网络工具
|
## 安装网络工具
|
||||||
apt install iperf iperf3 iftop
|
$ apt install iperf iperf3 iftop
|
||||||
|
|
||||||
## 安装 CPU 调度调整工具
|
## 安装 CPU 调度调整工具
|
||||||
apt install cpufrequtils
|
$ apt install cpufrequtils
|
||||||
|
|
||||||
## 根据 CPU 厂商安装 CPU 微码工具
|
## 根据 CPU 厂商安装 CPU 微码工具
|
||||||
apt install intel-microcode (amd64-microcode)
|
$ apt install intel-microcode (amd64-microcode)
|
||||||
|
|
||||||
## 更新 PCI 数据库
|
## 更新 PCI 数据库
|
||||||
update-pciids
|
$ update-pciids
|
||||||
```
|
```
|
||||||
|
|
||||||
## 3.配置 PVE 网络
|
## 3.配置 PVE 网络
|
||||||
|
|||||||
Reference in New Issue
Block a user