diff --git a/06.PVE制作DNS服务器.md b/06.PVE制作DNS服务器.md index 4cc7cec..a7ef4a3 100644 --- a/06.PVE制作DNS服务器.md +++ b/06.PVE制作DNS服务器.md @@ -124,7 +124,7 @@ $ sudo systemctl restart systemd-resolved.service `Adguard Home` 将采用 `snap` 形式安装,逐行执行以下命令。 ```bash -## 安装 snap +## 安装 Snap $ sudo apt install snapd ## 安装 Adguard Home @@ -214,10 +214,10 @@ $ sudo ./install -i 修改 `SmartDNS` 配置之前,需检查 `smartdns.service` 服务状态,确保该服务开机自启动。 ```bash -## 检查 smartdns.service +## 检查 SmartDNS 服务 $ sudo systemctl status smartdns.service -## 设置 smartdns.service 开机自启动 +## 设置 SmartDNS 服务开机自启 $ sudo systemctl enable smartdns.service ``` @@ -232,6 +232,16 @@ $ sudo systemctl enable smartdns.service $ sudo wget https://anti-ad.net/anti-ad-for-smartdns.conf -O /etc/smartdns/anti-ad-smartdns.conf ``` +修改 `SmartDNS` 主配置文件之前,建议关闭 `SmartDNS` 并清理 DNS 缓存文件。 + +```bash +## 关闭 SmartDNS 服务 +$ sudo systemctl stop smartdns.service + +## 清理 SmartDNS 缓存 +$ sudo rm -rvf /var/cache/smartdns +``` + `SmartDNS` 的主配置文件一般位于 `/etc/smartdns` 目录下,修改配置文件之前,使用以下命令将其备份。 ```bash @@ -252,6 +262,8 @@ $ sudo nvim /etc/smartdns/smartdns.conf - 当不使用 `anti-ad-smartdns.conf` 进行广告过滤时,需移除主配置文件中对应配置项。 +- 由于修改了缓存路径,`SmartDNS` 的缓存将在系统重启时自动删除,请根据实际情况进行调整。 + - 检查配置文件中关于本地域名及其上游 DNS 服务器相关配置,请根据实际情况进行调整。 ```bash