更新 PVE 系统调整

This commit is contained in:
CallMeR
2023-06-26 19:41:46 +08:00
parent b5febddb8a
commit 66bf4d3782
+19 -20
View File
@@ -4,41 +4,40 @@
在 PVE 系统调整之前,请确认必要的软件包已经安装完成,本文后续命令均在 SSH 终端下执行。 在 PVE 系统调整之前,请确认必要的软件包已经安装完成,本文后续命令均在 SSH 终端下执行。
```bash ```shell
## 同步镜像仓库 ## 同步镜像仓库
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
``` ```
## 1.系统时区 ## 1.系统时区
如果在安装 PVE 系统时选错了时区,导致系统时间和北京时间不一致,可以使用以下命令修正。 如果在安装 PVE 系统时选错了时区,导致系统时间和北京时间不一致,可以使用以下命令修正。
```bash
## 修改系统时区
timedatectl set-timezone Asia/Shanghai
## 检查系统时间
date -R
```
输出结果如果和北京时间一致,则代表修改正确。 输出结果如果和北京时间一致,则代表修改正确。
```shell ```bash
## 修改系统时区
$ timedatectl set-timezone Asia/Shanghai
## 检查系统时间
$ date -R
## 参考输出
Sun, 25 Jun 2023 12:12:12 +0800 Sun, 25 Jun 2023 12:12:12 +0800
``` ```
@@ -50,7 +49,7 @@ Debian 系统常用 `systemd-timesyncd.service` 来同步时间,而 PVE 系统
```bash ```bash
## 编辑 chrony 配置文件 ## 编辑 chrony 配置文件
nano /etc/chrony/chrony.conf $ nano /etc/chrony/chrony.conf
``` ```
在编辑器对话框中,将 `pool 2.debian.pool.ntp.org iburst` “注释” 掉,并添加国内的 NTP 服务器。 在编辑器对话框中,将 `pool 2.debian.pool.ntp.org iburst` “注释” 掉,并添加国内的 NTP 服务器。
@@ -69,12 +68,12 @@ pool ntp.aliyun.com iburst
保存该配置文件后,需重启 `chrony` 服务,并再次检查系统 NTP 服务器地址。 保存该配置文件后,需重启 `chrony` 服务,并再次检查系统 NTP 服务器地址。
```bash ```shell
## 重启 chrony 服务 ## 重启 chrony 服务
systemctl restart chrony.service $ systemctl restart chrony.service
## 检查系统 NTP 服务器 ## 检查系统 NTP 服务器
chronyc sources -V $ chronyc sources -V
``` ```
如果输出以下类似内容,则表示系统 NTP 服务器设置正确。 如果输出以下类似内容,则表示系统 NTP 服务器设置正确。