mirror of
https://gitee.com/callmer/pve_toss_notes.git
synced 2026-08-31 05:52:52 +08:00
适配 trixie 版本
This commit is contained in:
+28
-10
@@ -4,7 +4,25 @@
|
||||
|
||||
在 PVE 系统调整之前,请确认必要的软件包已经安装完成,本文后续命令均在 SSH 终端下执行。
|
||||
|
||||
关于 [Neovim](https://neovim.io/) 的基础使用方法,请参阅:[Neovim 基础教程](https://cn.bing.com/search?q=Neovim+%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B) 。
|
||||
Debian 系统默认编辑器为 `nano` ,推荐将默认编辑器更换为 `neovim` ,关于 [Neovim](https://neovim.io/) 的基础使用方法,请参阅:[Neovim 基础教程](https://cn.bing.com/search?q=Neovim+%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B) 。
|
||||
|
||||
```bash
|
||||
## 修改系统默认编辑器(选择 nvim 所在条目,即可将 neovim 设为默认编辑器)
|
||||
$ update-alternatives --config editor
|
||||
|
||||
#### 系统默认编辑器示例输出
|
||||
There are 3 choices for the alternative editor (providing /usr/bin/editor).
|
||||
|
||||
Selection Path Priority Status
|
||||
------------------------------------------------------------
|
||||
* 0 /bin/nano 40 auto mode
|
||||
1 /bin/nano 40 manual mode
|
||||
2 /usr/bin/nvim 30 manual mode
|
||||
3 /usr/bin/vim.tiny 15 manual mode
|
||||
|
||||
Press <enter> to keep the current choice[*], or type selection number: 2
|
||||
update-alternatives: using /usr/bin/nvim to provide /usr/bin/editor (editor) in manual mode
|
||||
```
|
||||
|
||||
## 1.系统时区
|
||||
|
||||
@@ -29,7 +47,7 @@ Debian 系统常用 `systemd-timesyncd.service` 来同步时间,而 PVE 系统
|
||||
|
||||
```bash
|
||||
## 编辑 chrony 配置文件
|
||||
$ nvim /etc/chrony/chrony.conf
|
||||
$ editor /etc/chrony/chrony.conf
|
||||
```
|
||||
|
||||
在编辑器对话框中,将 `pool 2.debian.pool.ntp.org iburst` “注释” 掉,并添加国内的 NTP 服务器。
|
||||
@@ -150,11 +168,11 @@ performance powersave
|
||||
|
||||
- CPU 驱动为 `intel_pstate` 时,推荐使用 `powersave` 调度器。
|
||||
|
||||
本文使用 `powersave` 调度器为演示,使用 `neovim` 编辑器创建 `cpupower` 的配置文件。
|
||||
本文使用 `powersave` 调度器创建 `cpupower` 的配置文件。
|
||||
|
||||
```bash
|
||||
## 创建 cpupower 默认配置文件
|
||||
$ nvim /etc/default/cpupower
|
||||
$ editor /etc/default/cpupower
|
||||
```
|
||||
|
||||
在配置文件中修改以下配置项,并保存。
|
||||
@@ -172,7 +190,7 @@ CPUPOWER_STOP_OPTS="frequency-set -g performance"
|
||||
|
||||
```bash
|
||||
## 创建 cpupower.service 配置文件
|
||||
$ nvim /etc/systemd/system/cpupower.service
|
||||
$ editor /etc/systemd/system/cpupower.service
|
||||
```
|
||||
|
||||
在服务配置文件中修改以下配置项,并保存。
|
||||
@@ -290,7 +308,7 @@ $ dpkg-reconfigure -plow unattended-upgrades
|
||||
$ cd /etc/apt/apt.conf.d
|
||||
|
||||
## 编辑 20auto-upgrades 配置文件
|
||||
$ nvim /etc/apt/apt.conf.d/20auto-upgrades
|
||||
$ editor /etc/apt/apt.conf.d/20auto-upgrades
|
||||
```
|
||||
|
||||
删除里面全部内容,添加以下配置项,并保存。
|
||||
@@ -311,7 +329,7 @@ APT::Periodic::CleanInterval "1";
|
||||
|
||||
```bash
|
||||
## 编辑 50unattended-upgrades 配置文件
|
||||
$ nvim /etc/apt/apt.conf.d/50unattended-upgrades
|
||||
$ editor /etc/apt/apt.conf.d/50unattended-upgrades
|
||||
```
|
||||
|
||||
配置文件中,被修改的参数解释如下:
|
||||
@@ -421,7 +439,7 @@ Jan 20 18:43:03 node01 systemd[1]: Started apt-daily-upgrade.timer - Daily apt u
|
||||
|
||||
```bash
|
||||
## 编辑 Grub 配置文件
|
||||
$ nvim /etc/default/grub
|
||||
$ editor /etc/default/grub
|
||||
```
|
||||
|
||||
在编辑器对话框中修改 `GRUB_CMDLINE_LINUX_DEFAULT` 参数,注意命令中间的空格。
|
||||
@@ -455,7 +473,7 @@ $ update-grub
|
||||
|
||||
```bash
|
||||
## 编辑系统配置文件
|
||||
$ nvim /etc/modules
|
||||
$ editor /etc/modules
|
||||
```
|
||||
|
||||
在配置文件中添加以下配置项,并保存。
|
||||
@@ -581,7 +599,7 @@ $ swapon /swap/swapfile
|
||||
|
||||
```bash
|
||||
## 编辑 fstab 配置文件
|
||||
$ nvim /etc/fstab
|
||||
$ editor /etc/fstab
|
||||
```
|
||||
|
||||
`fstab` 为系统关键配置文件,直接影响系统启动,修改此文件时,请注意以下几点:
|
||||
|
||||
Reference in New Issue
Block a user