diff --git a/03.PVE系统调整.md b/03.PVE系统调整.md index c6c5dfc..d68d4ce 100644 --- a/03.PVE系统调整.md +++ b/03.PVE系统调整.md @@ -4,41 +4,40 @@ 在 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 调度调整工具 -apt install cpufrequtils +$ apt install cpufrequtils ## 根据 CPU 厂商安装 CPU 微码工具 -apt install intel-microcode (amd64-microcode) +$ apt install intel-microcode (amd64-microcode) ## 更新 PCI 数据库 -update-pciids +$ update-pciids ``` ## 1.系统时区 如果在安装 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 ``` @@ -50,7 +49,7 @@ Debian 系统常用 `systemd-timesyncd.service` 来同步时间,而 PVE 系统 ```bash ## 编辑 chrony 配置文件 -nano /etc/chrony/chrony.conf +$ nano /etc/chrony/chrony.conf ``` 在编辑器对话框中,将 `pool 2.debian.pool.ntp.org iburst` “注释” 掉,并添加国内的 NTP 服务器。 @@ -69,12 +68,12 @@ pool ntp.aliyun.com iburst 保存该配置文件后,需重启 `chrony` 服务,并再次检查系统 NTP 服务器地址。 -```bash +```shell ## 重启 chrony 服务 -systemctl restart chrony.service +$ systemctl restart chrony.service ## 检查系统 NTP 服务器 -chronyc sources -V +$ chronyc sources -V ``` 如果输出以下类似内容,则表示系统 NTP 服务器设置正确。