php-如何使用powerdns的接口

powerdns安装教程 如何使用powerdns的http-api ? 文档需知 powerdns文档 Swagger接入开发 powerdns的yaml配置文件 | swagger官网 Swagger 生成插件 Sign in 登录 (没有账号的免费注册一个) Create New -> Create New API 创建完毕将powerdns的yaml配置文件粘贴到代码框中 右上角 -> Export -> Client SDK -> 指定的开发语言,像我就用PHP github创建一个新的 repository , 将导出来的文件上传上去 修改composer.json { "repositories": [ { "type": "git", "url": "https://github.com/suguer/powerdns.git" } ], "require": { "suguer/powerdns": "*@dev" } } 开始使用 DnsPowerDnsClient.php use Swagger\Client\Api\ZonesApi; use Swagger\Client\ApiException; use Swagger\Client\Model\RRSet; use Swagger\Client\Model\Zone; use Swagger\Client\Configuration; class DnsPowerDnsClient { private $server_id = "localhost"; /** * @var \GuzzleHttp\Client */ private $client; /** * @var ZonesApi */ private $zoneApi; private $currentNsList = ['ns1','ns2']; public function __construct() { $config=[ "ip" => "", "api_key" => "", ]; $this->client = new \GuzzleHttp\Client([ 'timeout' => 40....

八月 19, 2022 · 7 分钟 · Ken

powerdns-学习如何搭建个人专属DNS服务器

powerdns | powerdns_http_api | download link 1、 环境 environment 系统 centos 7.9 2、 安装 install powerdns yum install epel-release yum-plugin-priorities curl -o /etc/yum.repos.d/powerdns-auth-45.repo https://repo.powerdns.com/repo-files/centos-auth-45.repo yum install pdns 3、 安装 install pdns-recursor yum -y install epel-release yum-plugin-priorities curl -o /etc/yum.repos.d/powerdns-rec-45.repo https://repo.powerdns.com/repo-files/centos-rec-45.repo yum -y install pdns-recursor 4、 配置 configure 修改mysql配置文件 [mysqld] /etc/my.cnf innodb_file_per_table = 1 innodb_flush_log_at_trx_commit = 0 character-set-server=utf8 collation-server=utf8_general_ci create database poweradmin; grant all on poweradmin.* to puser1@localhost identified by "wisdom123@"; flush privileges; mysql -u root poweradmin < /usr/share/doc/pdns-backend-mysql-4....

八月 17, 2022 · 1 分钟 · Ken