Use PowerDNS to build a free DNS server. Attached is the entire installation and configuration process of PowerDNS.

888u

Last update at :2024-07-12,Edit by888u

For various reasons, many of our users may need to build their own DNS servers. There are various ways to build them. Snail is fortunate to have access to the free and open source PowerDNS system, which can help us build free DNS servers on Windows and Linux. The public’s introduction to PowerDNS is this, let me just copy the original words: “PowerDNS is a cross-platform open source DNS service component. PowerDNS has both Windows and Linux/Unix versions. PowerDNS can use Access’s mdb file to record DNS under Windows. information, and then you can use MySQL to record DNS information under Linux/Unix.\\"

I originally saw the introduction and installation method in a foreign blog, but because the information may be out of date, or the snail skills are not as good as others, it took 2 days to complete the complete setup, and then reinstalled the VPS. Finish writing this article. At least I can guarantee that this PowerDNS construction process was carried out successfully by myself. This article is based on centos 6 32-bit, and the record is as follows.

First, install the MYSQL service component

Because PowerDNS requires a MYSQL database to store data, a MYSQL database environment needs to be set up.

yum -y install mysql mysql-server #Install MYSQLchkconfig –levels 235 mysqld on #Set up boot /etc/init.d/mysqld start

Change root user mysql password

mysqladmin -u root passwordmyrootpassword

Second, install PowerDNS

yum install wgetwget https://soft.laozuo.org/powerdns/epel-release-6-8.noarch.rpmrpm -Uvh ./epel-release-6-8.noarch.rpm

yum install pdns pdns-backend-mysql

Connect to MYSQL and create a database

mysql -u root -p

After connecting, enter the password we set above to log in to MYSQL, and then start creating databases and users

create database powerdns; #Create database

#Create the database user power_user, and set www.laozuo.org as the password. When we set it, we changed it to our own password

grant all onpowerdns.* to\\’power_user\\’@\\’localhost\\’ identified by\\’www.laozuo.org\\’;flush privileges;

#Create data table

use powerdns;create table domains (id int auto_increment,name varchar(255) not null,master varchar(128) default null,last_check int default null,type varchar(6) not null,notified_serial int default null,account varchar (40) default null,primary key (id));

create unique index name_index on domains(name);create table records (id int auto_increment,domain_id int default null,name varchar(255) default null,type varchar(6) default null,content varchar(255) default null, ttl int default null,prio int default null,change_date int default null,primary key(id));

create index rec_name_index on records(name);create index nametype_index on records(name,type);create index domain_id on records(domain_id);

create table supermasters (ip varchar(25) not null,nameserver varchar(255) not null,account varchar(40) default null);

#Exit the current MYSQL management

quit;

Third, edit the vi /etc/pdns/pdns.conf configuration file

launch=gmysqlgmysql-host=127.0.0.1gmysql-user=power_usergmysql-password=www.laozuo.orggmysql-dbname=powerdns

Add the above to pdns.conf at the end. Pay attention to modify the above database user name and password to compare with those set above.

Set PowerDNS to automatically start at boot

chkconfig –levels 235 pdns on/etc/init.d/pdns start

So far, our POWERDNS has been installed, and we need to install the WEB management interface later.

Fourth, install the PowerAdmin management platform

A – Install PHP environment

yum -y install httpd php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mhash gettext

Set up to start apache at boot

chkconfig –levels 235 httpd on/etc/init.d/httpd start

B – 2 supporting components required for the installation environment

yum install php-pear-DB php-pear-MDB2-Driver-mysql

C – Install PowerAdmin

Above A and B have completed the environment that PowerAdmin needs to support. Here we install the latest poweradmin-2.1.7 version package

cd /tmpwgethttps://soft.laozuo.org/powerdns/poweradmin-2.1.7.tgz

tar zxvfpoweradmin-2.1.7mv poweradmin-2.1.7 /var/www/html/poweradmintouch /var/www/html/poweradmin/inc/config.inc.phpchown -R apache:apache /var/www/html/ poweradmin/

We first download and decompress the latest version of poweradmin-2.1.7 in the temporary folder tmp, and then move it to the VAR/WWW/HTML directory.

After this is completed, we can use the IP address of our VPS /poweradmin/install/ to open the POWERDNS installation wizard.

Fifth, install the PowerAdmin wizard

Here we look at the picture above and select the first English language. Later we can select CHINESE when setting up an account to log in.

Enter here is the set database information and set the Poweradmin panel password.

Set database user information and DNS domain name server information.

Then confirm until the end, you need to delete the install/ directory file, and then log in to the POWERDNS panel at the ip address/poweradmin/.

The panel management user name is admin, the password is the one we set before, and you can choose the CHINESE Chinese panel.

So far, we have seen that PowerDNS has been installed and the management interface can be logged in. Because it is a demonstration operation, I use the root information for the database. If we actually build it, we will need a separate user information to ensure the security of the account. Regarding how to use it, if you have time to write a supplementary application method in the future, friends who generally use it should be able to figure it out for themselves.

Recommended site searches: domain name information query, Hong Kong vps host, registration-free cdn acceleration, free international domain name, free space in mainland China, domain name registration query forum host, domain name check, corporate email, host domain name,

Use PowerDNS to build a free DNS server. Attached is the entire installation and configuration process of PowerDNS.

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码