# 使用 Homebrew, apk, apt, dnf, MacPorts, pacman 安装 knot-resolver

查看 knot-resolver 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:knot-resolver
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install knot-resolver
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install knot-resolver
```

  证据: MacPorts ports tree: net/knot-resolver/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add knot-resolver
```

  证据: Alpine Linux edge package indexes: knot-resolver from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install knot-resolver
```

  证据: Debian stable package indexes: knot-resolver from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install knot-resolver
```

  证据: Fedora Rawhide package metadata: knot-resolver from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- pacman (92%):

```sh
sudo pacman -S knot-resolver
```

  证据: Arch Linux sync databases: knot-resolver from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## 软件包事实

- **软件包键:** brew:knot-resolver
- **软件包管理器:** Homebrew
- **版本:** 6.4.1
- **来源摘要:** Minimalistic, caching, DNSSEC-validating DNS resolver
- **主页:** <https://www.knot-resolver.cz>
- **最后更新:** 2026-07-22T17:13:25Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- knot-resolver (别名)
- kres-cache-gc (别名)
- kresctl (别名)
- kresd (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 6.4.1
## 项目历史与用法

Knot Resolver is CZ.NIC's caching, DNSSEC-validating recursive resolver, built as the resolver-side member of the Knot DNS family. Its package-manager identity matters because it is both a server daemon and a scriptable DNS platform: the Homebrew formula installs command-line tools such as kresd, kresctl, and cache maintenance utilities, while Unix packages place it beside other serious recursive resolvers.

### 项目历史

The project reached its first public 1.0.0 release on 2016-05-30. Its early design combined a small C core with Lua/LuaJIT scripting and optional modules, a contrast with larger monolithic resolver codebases. The 1.1.0 release on 2016-08-12 already added features that became important to modern recursive DNS operations, including DNS Cookies, DNS over TLS, Prometheus metrics, query minimisation improvements, and a DNS firewall module.

Knot Resolver later split from the older ReadTheDocs-hosted documentation flow into CZ.NIC-controlled GitLab Pages documentation for the 6.x series, while keeping a stable public website and development repository under the CZ.NIC GitLab. The project remained tightly related to Knot DNS but serves the opposite side of DNS: recursive/caching resolution rather than authoritative zone service.

### 采用历史

CZ.NIC presents Knot Resolver as scalable from home routers to large resolver farms. The project website records operational adoption beyond CZ.NIC, including CETIN using it in infrastructure since 2017 and Cloudflare describing it as a cornerstone of the 1.1.1.1 public resolver service.

Its adoption story is package-nerd relevant because recursive resolver software is often chosen conservatively. A resolver that appears in Homebrew, Debian, Fedora, Arch, Alpine, MacPorts, and Ubuntu packaging occupies a practical testing and operations lane next to Unbound, BIND, PowerDNS Recursor, and systemd-resolved.

### 使用方式

Users install Knot Resolver to run local, organizational, ISP, or public recursive DNS service with DNSSEC validation and caching. Its module system is central to usage: policy rules, forwarding, DNS-over-TLS, DNS-over-HTTPS, metrics, cache behavior, and filtering can be adjusted without treating the daemon as a black box.

The package also exposes companion tools for control and maintenance, so it is not just a background daemon formula. In package sets, that makes it useful to DNS operators who want reproducible installs on laptops, CI images, lab hosts, and production-like Unix systems.

### 为什么软件包爱好者会关心

Knot Resolver is interesting to package maintainers because it combines a network daemon, a scripting/runtime layer, DNSSEC crypto dependencies, system service integration, and changing configuration formats. Those are the things that expose weak packaging: wrong paths, missing service users, broken Lua module paths, or mismatched library versions show up quickly.

It also represents the post-2010 shift in DNS software toward encrypted transports, observability, and programmable policy. For users browsing package indexes, it is the recursive counterpart to Knot DNS and one of the few widely packaged alternatives that is both modern and registry-backed.

### 时间线

- 2016-05-30: Knot Resolver 1.0.0 initial release.
- 2016-08-12: Knot Resolver 1.1.0 added DNS Cookies, DNS over TLS, Prometheus metrics, and query-minimisation improvements.
- 2017: CETIN adoption is described by CZ.NIC's project site as part of its infrastructure history.
- 2024-2025: The 5.7.x release series included KeyTrap-related DNSSEC hardening and maintenance updates.
- 2026-06-16: CZ.NIC announced Knot Resolver 6.4.0 on the project website.

### Related projects

- Knot DNS is the authoritative DNS server in the same CZ.NIC family. Knot Resolver commonly appears in comparisons with Unbound, BIND, PowerDNS Recursor, and systemd-resolved because all can occupy recursive DNS roles, though their architecture and operational tradeoffs differ.

### 来源

- <https://knot-resolver.readthedocs.io/en/stable/NEWS.html>
- <https://www.knot-resolver.cz/>
- <https://www.knot-resolver.cz/development/>


## 安全说明

formula declares a Homebrew service.

- **Geiger 风险:** orange / 中
- formula declares a Homebrew service


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: /etc/knot-resolver/config.yaml
## 其他软件包管理器记录

- Debian apt - knot-resolver - 5.7.5-1: normalized package name match | Debian stable package indexes: knot-resolver from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | caching, DNSSEC-validating DNS resolver | https://www.knot-resolver.cz/
- Debian apt - knot-resolver-doc - 5.7.5-1: normalized package name match | Debian stable package indexes: knot-resolver-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Documentation for Knot Resolver | https://www.knot-resolver.cz/
- Debian apt - knot-resolver-module-http - 5.7.5-1: normalized package name match | Debian stable package indexes: knot-resolver-module-http from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | HTTP module for Knot Resolver | https://www.knot-resolver.cz/
- Ubuntu apt - knot-resolver - 5.7.2-1: normalized package name match | Ubuntu 24.04 LTS package indexes: knot-resolver from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | caching, DNSSEC-validating DNS resolver | https://www.knot-resolver.cz/
- Ubuntu apt - knot-resolver-doc - 5.7.2-1: normalized package name match | Ubuntu 24.04 LTS package indexes: knot-resolver-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Documentation for Knot Resolver | https://www.knot-resolver.cz/
- Ubuntu apt - knot-resolver-module-http - 5.7.2-1: normalized package name match | Ubuntu 24.04 LTS package indexes: knot-resolver-module-http from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | HTTP module for Knot Resolver | https://www.knot-resolver.cz/
- apk - knot-resolver - 5.7.7-r0: normalized package name match | Alpine Linux edge package indexes: knot-resolver from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Minimalistic caching DNS resolver implementation | https://www.knot-resolver.cz/
- apk - knot-resolver-dbg - 5.7.7-r0: normalized package name match | Alpine Linux edge package indexes: knot-resolver-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Minimalistic caching DNS resolver implementation (debug symbols) | https://www.knot-resolver.cz/
- apk - knot-resolver-dev - 5.7.7-r0: normalized package name match | Alpine Linux edge package indexes: knot-resolver-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Minimalistic caching DNS resolver implementation (development files) | https://www.knot-resolver.cz/
- apk - knot-resolver-doc - 5.7.7-r0: normalized package name match | Alpine Linux edge package indexes: knot-resolver-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Minimalistic caching DNS resolver implementation (documentation) | https://www.knot-resolver.cz/
- apk - knot-resolver-libs-static - 5.7.7-r0: normalized package name match | Alpine Linux edge package indexes: knot-resolver-libs-static from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Minimalistic caching DNS resolver implementation (static library) | https://www.knot-resolver.cz/
- apk - knot-resolver-mod-dnstap - 5.7.7-r0: normalized package name match | Alpine Linux edge package indexes: knot-resolver-mod-dnstap from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Knot Resolver - dnstap logging | https://www.knot-resolver.cz/
- apk - knot-resolver-mod-http - 5.7.7-r0: normalized package name match | Alpine Linux edge package indexes: knot-resolver-mod-http from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Knot Resolver - HTTP/2 services | https://www.knot-resolver.cz/
- apk - knot-resolver-openrc - 5.7.7-r0: normalized package name match | Alpine Linux edge package indexes: knot-resolver-openrc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Minimalistic caching DNS resolver implementation (OpenRC init scripts) | https://www.knot-resolver.cz/
- dnf - knot-resolver - 5.7.6-3.fc44: normalized package name match | Fedora Rawhide package metadata: knot-resolver from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Caching full DNS Resolver | https://www.knot-resolver.cz/
- dnf - knot-resolver-devel - 5.7.6-3.fc44: normalized package name match | Fedora Rawhide package metadata: knot-resolver-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development headers for Knot Resolver | https://www.knot-resolver.cz/


## Combined YAML source

View the package source record on GitHub. [combined/knot-resolver.yml](https://github.com/mxcl/pkgdb/blob/main/combined/knot-resolver.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
