0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VirtualBox + Locky Linux9 + PowerDNS

Last updated at Posted at 2025-08-02

準備

MySQL 8.0
PHP 8.3

サードパーティリポジトリ

epelが必要そうなのでインストール
サードパーティリポジトリインストール

PoserDNS

インストール

# dnf install pdns
# dnf install pdns-backend-mysql

設定 MySQL

スキーマの準備
/usr/share/doc/pdns/schema.mysql.sql にスキーマが記載されているのでそれを使う。

mysql> create database pdns;
mysql> quit;
# mysql -u root -p pdns < /usr/share/doc/pdns/schema.mysql.sql
# mysql -u root -p
mysql> use powerdns
mysql> show tables;
+----------------+
| Tables_in_pdns |
+----------------+
| comments       |
| cryptokeys     |
| domainmetadata |
| domains        |
| records        |
| supermasters   |
| tsigkeys       |
+----------------+
7 rows in set (0.00 sec)
mysql> quit

設定 /etc/pdns/pdns.conf

primary=yes
launch=gmysql
gmysql-host=127.0.0.1
gmysql-port=3306
gmysql-dbname=pdns
gmysql-user=root
gmysql-password=**********

### サービス開始
```console
# systemctl enable pdns.service
# systemctl is-enabled pdns.service
# systemctl start pdns.service
# systemctl status pdns.service

ポート開放

# firewall-cmd --add-service=dns --zone=public --permanent
# firewall-cmd --reload
# firewall-cmd --list-services

おまけ Webサーバーインストール

Webベースの管理ツールを使うのApacheをインストールする

# dnf install httpd
# systemctl start httpd
# systemctl status httpd
# systemctl enable httpd
# systemctl is-enabled httpd

// ポート開放
# firewall-cmd --add-service=http --zone=public --permanent
# firewall-cmd --reload
# firewall-cmd --list-service
dns http ssh

// https化
# dnf install mod_ssl
# /etc/httpd/conf.d/ssl.conf
ServerName 192.168.56.130:443
SSLProtocol +TLSv1.2
# systemctl restart httpd.service
# systemctl status httpd.service

// ポート開放と不要となったhttpポートを閉鎖
# firewall-cmd --add-service=https --zone=public --permanent
# firewall-cmd --reload
# firewall-cmd --list-service
    https があればOK
# firewall-cmd --remove-service=http --zone=public --permanent
# firewall-cmd --reload
# firewall-cmd --list-service
    http がなければOK

おまけ PowerAdminのインストール

Webベースの管理ツール PowerAdmin をインストールする。

// モジュールインストール
# dnf install php-mysqlnd php-intl

// poweradminのソース取得
# dnf install git
$ cd /opt/project/
$ git clone https://github.com/poweradmin/poweradmin.git

// インストーラ起動準備
# cd /var/www/html/
# ln -s /opt/project/poweradmin poweradmin
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?