整理文档结构

This commit is contained in:
CallMeR
2025-01-06 17:11:27 +08:00
parent 0731dd1fde
commit 81c5c3456a
3 changed files with 92 additions and 84 deletions
+32 -28
View File
@@ -141,7 +141,32 @@ $ sudo apt install tailscale
$ sudo sync
```
### 1.4.调整内核模块
### 1.4.配置 ZSH
`Zsh` 是比 `Bash` 好用的 `Shell` 程序,使用 `oh-my-zsh` 进行配置。
```bash
## 返回 home 目录
$ cd
## 使用清华大学镜像站安装 oh-my-zsh
$ git clone https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git
$ cd ohmyzsh/tools
$ REMOTE=https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git sh install.sh
## 询问是否切换默认 shell,输入 Y
#### 示例输出
Time to change your default shell to zsh:
Do you want to change your default shell to zsh? [Y/n] y
## oh-my-zsh 安装后清理
$ cd && rm -rvf .bash_history .zsh_history .shell.pre-oh-my-zsh ohmyzsh
```
### 1.5.调整内核模块
使用 `neovim` 编辑器编辑 **内核模块** 配置文件,执行以下命令。
@@ -160,7 +185,7 @@ nf_conntrack
```
### 1.5.调整内核参数
### 1.6.调整内核参数
使用 `neovim` 编辑器编辑 **内核参数** 配置文件,执行以下命令。
@@ -250,7 +275,7 @@ net.netfilter.nf_conntrack_tcp_timeout_established = 7440
$ sudo sysctl -f
```
### 1.6.调整系统时间
### 1.7.调整系统时间
默认情况下 Debian 云镜像的系统时间需要调整,执行以下命令将系统时区设置为中国时区。
@@ -295,7 +320,7 @@ $ sudo systemctl restart systemd-timesyncd.service
$ sudo systemctl status systemd-timesyncd.service
```
### 1.7.配置自动更新
### 1.8.配置自动更新
配置系统自动更新策略,执行以下命令,使用键盘 `左右方向键` 进行选择,`回车键` 进行确认。
@@ -395,7 +420,7 @@ $ sudo systemctl restart apt-daily-upgrade.timer
$ sudo systemctl status apt-daily-upgrade.timer
```
### 1.8.配置防火墙
### 1.9.配置防火墙
修改防火墙配置之前,需检查 `nftables.service` 服务状态,确保该服务开机自启。
@@ -426,7 +451,7 @@ $ sudo nvim /etc/nftables.conf
$ sudo systemctl restart nftables.service
```
### 1.9.调整系统端口
### 1.10.调整系统端口
为了正常使用 `53` 端口,需要对 `systemd-resolved.service` 进行配置,执行以下命令。
@@ -465,7 +490,7 @@ $ sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
$ sudo systemctl restart systemd-resolved.service
```
### 1.10.配置 Dnsmasq
### 1.11.配置 Dnsmasq
检查 `dnsmasq.service` 服务状态,确保该服务开机自启。
@@ -563,27 +588,6 @@ server=172.16.1.1
$ sudo systemctl restart dnsmasq.service
```
### 1.11.配置 ZSH
`Zsh` 是比 `Bash` 好用的 `Shell` 程序,使用 `oh-my-zsh` 进行配置。
```bash
## 返回 home 目录
$ cd
## 使用 curl 安装 oh-my-zsh
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
## 或者使用 wget 安装 oh-my-zsh
$ sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
## 询问是否切换默认 shell,输入 Y
#### 示例输出
Time to change your default shell to zsh:
Do you want to change your default shell to zsh? [Y/n] y
```
## 2.配置 Tailscale
根据不同的启动参数,TS 服务将具有不同的业务能力。