编译安装_Unbound编译安装
簡介
Unbound是一個快速精巧的DNS服務器,可以在FreeBSD,OpenBSD,NetBSD,MacOS,Linux和Microsoft Windows上運行。相比bind的配置簡單多了。
下載
wget -c https://nlnetlabs.nl/downloads/unbound/unbound-1.9.6.tar.gz解壓編譯安裝
tar zxvf unbound-1.9.6.tar.gzcd unbound-1.9.6./configure --prefix=/usr/local/unboundmakemake install創建運行用戶
useradd -s /usr/bin/nologin -M unbound創建密鑰
/usr/local/unbound/sbin/unbound-control-setup默認配置文件路徑
在編譯的時候制定prefix,就會在安裝路徑下的etc/unbound目錄中,找到配置文件unbound.conf
server:
# 日志級別,默認是1
verbosity: 1
# 線程數
num-threads: 2
# 監聽地址
interface: 0.0.0.0
# 監聽端口
port: 53
# 允許控制地址
access-control: 127.0.0.0/8 allow
# 運行用戶
username: "unbound"
# 日志文件
logfile: "unbound.log"
# 不記錄到系統日志
use-syslog: no
# 記錄請求
log-queries: yes
# 引入解析額外的解析文件,格式跟下面的格式一樣
# include: /usr/local/unbound/etc/unbound/config.d/*.conf
# 解析example.com記錄
local-zone: "example.com" redirect
# 解析A記錄
local-data: "example.com A 192.0.2.3"
python:
remote-control:
# 允許遠程控制
control-enable: yes
# 監聽地址
control-interface: 127.0.0.1
# 監聽端口
control-port: 8953
# key
server-key-file: "/usr/local/unbound/etc/unbound/unbound_server.key"
server-cert-file: "/usr/local/unbound/etc/unbound/unbound_server.pem"
control-key-file: "/usr/local/unbound/etc/unbound/unbound_control.key"
control-cert-file: "/usr/local/unbound/etc/unbound/unbound_control.pem"
# 轉發設置
forward-zone:
# 轉發所有
name: "."
# 轉發地址
forward-addr: 114.114.114.114
啟動服務
/usr/local/unbound/sbin/unbound總結
遠程控制可以控制啟動、停止和reload。
總結
以上是生活随笔為你收集整理的编译安装_Unbound编译安装的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: d3.js中点可以用图片吗_结论第16课
- 下一篇: sql求平均日活_杨学峰博客 | Fla