我想开始在OracleLinux7.6上使用systemd-resolved。
我想在这种模式下使用它,在这种模式下,/etc/resolv.conf只是/run/systemd/resolve/stub-resolv.conf的一个符号链接,只有nameserver 127.0.0.53作为内容。
我已经安装了systemd-networkd和systemd-resolved软件包。我启用了相关服务,并禁用了NetworkManager和network服务。
但是,我安装的systemd-resolved不包含这个存根文件/run/systemd/resolve/stub-resolv.conf。它只包含/run/systemd/resolve/resolv.conf。
你能告诉我为什么我的stub-resolv.conf不见了吗?
发布于 2022-01-13 11:47:54
我多次在Ubuntu20.04LTS上遇到了同样的问题,这仅仅是因为systemd解析的. same要么是自动停止的,要么是故意停止的。启动服务后,文件/run/systemd/ back文件返回。
发布于 2020-06-08 10:05:44
我在Debian 9上观察到了同样的问题。根据(man8systemd解决了的. observing ):
o A static file /usr/lib/systemd/resolv.conf is provided that lists the 127.0.0.53 DNS stub (see above) as only DNS server. This file may be symlinked from /etc/resolv.conf in order to connect all local clients that bypass local DNS APIs to systemd-resolved. This mode of operation is recommended.这不是真的,实际上该文件位于:/lib/systemd/rupv.conf下面,这是一个普通的静态文件,指向本地存根服务器,没有搜索域等等。
如果升级到Debian 10版本的systemd解析版本,则从232移动到241。这将启用正确的存根文件:/run/systemd/ stub /stub-conv.conf
我想您使用的是类似于Debian 9的系统解析版本。请检查您的人并使用find找到您的resolv.conf文件。
https://serverfault.com/questions/1000859
复制相似问题