PowerDNS篇1-简介和安装

本文深入介绍了PowerDNS的特性及其在CentOS7上的安装配置,包括Authoritative Server与Recursor的安装,以及与MySQL的集成。重点讲述了如何配置pdns-auth与MySQL数据库,以及使用API请求和日志处理。最后通过DNS解析测试验证了配置的正确性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

本文主要介绍PowerDNS的主要特性和初始化安装的配置方法,侧重点是对复杂程度相对较高PowerDNS Authoritative Server进行介绍,同时会夹杂部分PowerDNS-Recursor的初始化安装和配置。

1、PowerDNS简介

PowerDNS(PDNS)成立于20世纪90年代末,是开源DNS软件、服务和支持的主要供应商,它们提供的权威认证DNS服务器递归认证DNS服务器都是100%开源的软件,同时也和红帽等开源方案提供商一样提供了付费的技术支持版本。同时官方表示为了避免和软件使用者出现竞争,他们只提供服务支持而不提供DNS托管服务。

Our Authoritative Server, Recursor and dnsdist products are 100% open source. For the service provider market, OX also sells the PowerDNS Platform which builds on our Open Source products to deliver an integrated DNS solution with 24/7 support and includes features as parental control, malware filtering, automated attack mitigation, and long-term query logging & searching.

熟悉DNS工作原理的同学可以大致地将DNS记录的查询分为两种:查询本地缓存向上递归查询。和其他的如BIND、dnsmasq等将这些功能集成到一起的DNS软件不同,PowerDNS将其一分为二,分为了PowerDNS Authoritative ServerPowerDNS Recursor,分别对应这两种主要的需求,而我们常说的pdns指的就是PowerDNS Authoritative Server (后面简称PDNS Auth),主要用途就是作为权威域名服务器,当然也可以作为普通的DNS服务器提供DNS查询功能。

对于PowerDNS-Recursor,PowerDNS官网介绍其是一个内置脚本能力的高性能的DNS递归查询服务器,并且已经为一亿五千万个互联网连接提供支持。

The PowerDNS Recursor is a high-performance DNS recursor with built-in scripting capabilities. It is known to power the resolving needs of over 150 million internet connections.

PowerDNS-Recursor(以下简称pdns-rec)的官方文档可以点击这里查看。官方指的内置脚本能力是指在4.0.0版本之后的配置文件里面添加了对lua脚本的支持。

2、PowerDNS安装

2.1 PowerDNS Authoritative Server安装

这里我们还是使用经典的CentOS7系统进行安装测试,系统的相关版本和内核信息如下:

[root@tiny-test home]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:        7.9.2009
Codename:       Core
[root@tiny-test home]# uname -r
3.10.0-1160.11.1.el7.x86_64

pdns对主流的操作系统都有着较好的支持,在centos上面可以直接通过repo仓库来安装,红帽系的Linux可以通过epel源,monshouwer提供的第三方源和powerdns官方源三种源来进行安装。

On RedHat based systems there are 3 options to install PowerDNS, from EPEL, the repository from Kees Monshouwer or from the PowerDNS repositories:

使用epel源来进行安装的话可能会导致无法安装最新版本

如果网络条件允许的话,最好的办法是直接通过官方的repo源来进行安装,如果使用的是master源,则可以安装到最新的测试版本:

yum install epel-release yum-plugin-priorities
curl -o /etc/yum.repos.d/powerdns-auth-master.repo https://repo.powerdns.com/repo-files/centos-auth-master.repo
yum install pdns
yum install pdns-backend-$backend

这里我们使用最新的稳定版4.4版本进行安装,backend这里我们选择pdns-backend-mysql

yum install epel-release yum-plugin-priorities
curl -o /etc/yum.repos.d/powerdns-auth-44.repo https://repo.powerdns.com/repo-files/centos-auth-44.repo
yum install pdns
yum install pdns-backend-$backend

请注意对于某些软件包源,bind backend作为基本pdns软件包的一部分提供,并且没有单独的pdns-backend-bind软件包。

2.2 PowerDNS-Recursor安装

这里我们还是使用经典的CentOS7系统进行安装测试,系统的相关版本和内核信息如下:

[root@tiny-cloud /home]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:        7.9.2009
Codename:       Core
[root@tiny-cloud /home]# uname -r
3.10.0-1160.24.1.el7.x86_64

pdns对主流的操作系统都有着较好的支持,在红帽系和CentOS系相关的发行版本上面可以之间通过epel源来进行安装࿰

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值