mirror of
https://gitee.com/callmer/pve_toss_notes.git
synced 2026-08-31 22:12:51 +08:00
更新 SmartDNS 配置
This commit is contained in:
+15
-3
@@ -124,7 +124,7 @@ $ sudo systemctl restart systemd-resolved.service
|
|||||||
`Adguard Home` 将采用 `snap` 形式安装,逐行执行以下命令。
|
`Adguard Home` 将采用 `snap` 形式安装,逐行执行以下命令。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
## 安装 snap
|
## 安装 Snap
|
||||||
$ sudo apt install snapd
|
$ sudo apt install snapd
|
||||||
|
|
||||||
## 安装 Adguard Home
|
## 安装 Adguard Home
|
||||||
@@ -214,10 +214,10 @@ $ sudo ./install -i
|
|||||||
修改 `SmartDNS` 配置之前,需检查 `smartdns.service` 服务状态,确保该服务开机自启动。
|
修改 `SmartDNS` 配置之前,需检查 `smartdns.service` 服务状态,确保该服务开机自启动。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
## 检查 smartdns.service
|
## 检查 SmartDNS 服务
|
||||||
$ sudo systemctl status smartdns.service
|
$ sudo systemctl status smartdns.service
|
||||||
|
|
||||||
## 设置 smartdns.service 开机自启动
|
## 设置 SmartDNS 服务开机自启
|
||||||
$ sudo systemctl enable smartdns.service
|
$ 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
|
$ 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` 目录下,修改配置文件之前,使用以下命令将其备份。
|
`SmartDNS` 的主配置文件一般位于 `/etc/smartdns` 目录下,修改配置文件之前,使用以下命令将其备份。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -252,6 +262,8 @@ $ sudo nvim /etc/smartdns/smartdns.conf
|
|||||||
|
|
||||||
- 当不使用 `anti-ad-smartdns.conf` 进行广告过滤时,需移除主配置文件中对应配置项。
|
- 当不使用 `anti-ad-smartdns.conf` 进行广告过滤时,需移除主配置文件中对应配置项。
|
||||||
|
|
||||||
|
- 由于修改了缓存路径,`SmartDNS` 的缓存将在系统重启时自动删除,请根据实际情况进行调整。
|
||||||
|
|
||||||
- 检查配置文件中关于本地域名及其上游 DNS 服务器相关配置,请根据实际情况进行调整。
|
- 检查配置文件中关于本地域名及其上游 DNS 服务器相关配置,请根据实际情况进行调整。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user