mirror of
https://gitee.com/callmer/pve_toss_notes.git
synced 2026-08-31 14:02:53 +08:00
update 3.PVE系统调整.md.
Signed-off-by: 狐狸Nomad <9463297+callmer@user.noreply.gitee.com>
This commit is contained in:
@@ -40,6 +40,54 @@ Wed, 20 Jul 2022 16:21:28 +0800
|
||||
|
||||
输出结果如果和北京时间一致,则代表修改正确。
|
||||
|
||||
Debian 系统常用 `systemd-timesyncd.service` 来同步时间,而 PVE 系统使用 `chrony.service` 来同步时间。
|
||||
|
||||
为了使用国内的 NTP 服务器,需要对 `chrony.service` 进行配置。
|
||||
|
||||
执行以下命令对 `chrony` 的配置文件进行修改:
|
||||
|
||||
```bash
|
||||
## 编辑 chrony 配置文件
|
||||
sudo nano /etc/chrony/chrony.conf
|
||||
```
|
||||
|
||||
在编辑器对话框中,将 `pool 2.debian.pool.ntp.org iburst` 这行内容 “注释” 掉,并添加国内的 NTP 服务器,参考如下内容:
|
||||
|
||||
```bash
|
||||
## chrony 服务配置文件示例
|
||||
|
||||
# Use Debian vendor zone.
|
||||
# pool 2.debian.pool.ntp.org iburst ## 在这行前面增加注释符 # 来注释
|
||||
|
||||
# Use Custom vendor zone.
|
||||
pool ntp.tencent.com iburst
|
||||
pool ntp.aliyun.com iburst
|
||||
```
|
||||
|
||||
保存该配置文件后,重启 `chrony` 服务:
|
||||
|
||||
```bash
|
||||
## 重启 chrony 服务
|
||||
sudo systemctl restart chrony.service
|
||||
```
|
||||
|
||||
再检查系统 NTP 服务器是否被正确修改:
|
||||
|
||||
```bash
|
||||
## 检查系统 NTP 服务器
|
||||
chronyc sources -V
|
||||
```
|
||||
|
||||
如果输出以下类似内容,则表示系统 NTP 服务设置正确:
|
||||
|
||||
```bash
|
||||
## NTP 服务示例输出
|
||||
|
||||
MS Name/IP address Stratum Poll Reach LastRx Last sample
|
||||
===============================================================================
|
||||
^+ 139.199.215.251 2 10 177 244 -1669us[-1757us] +/- 67ms
|
||||
^* 203.107.6.88 2 10 377 105 -1005us[-1094us] +/- 19ms
|
||||
```
|
||||
|
||||
## 2.CPU调度器配置
|
||||
|
||||
|
||||
Reference in New Issue
Block a user