Thursday, August 22, 2019

.::: How To Install Cursor and PowerAdmin for powerDNS :::.


after install powerdns as http://teguhth.blogspot.com/2019/08/how-to-install-powerdns-and-poweradmin.html now install poweradmin

1. Installing PowerAdmin to Manage PowerDNS
[root@powerdns-teguht ~]# 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

2. Install additonal package
[root@powerdns-teguht ~]# yum -y install php-pear-DB php-pear-MDB2-Driver-mysqli

3. Start and enable httpd
[root@powerdns-teguht ~]# systemctl start httpd
[root@powerdns-teguht ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@powerdns-teguht ~]#

4. Download and extract poweradmin
[root@powerdns-teguht ~]# cd /var/www/html/
[root@powerdns-teguht html]# wget http://downloads.sourceforge.net/project/poweradmin/poweradmin-2.1.7.tgz
[root@powerdns-teguht html]# tar -xvf poweradmin-2.1.7.tgz
[root@powerdns-teguht html]# mv poweradmin-2.1.7 poweradmin
[root@powerdns-teguht html]#

[root@powerdns-teguht html]# firewall-cmd --add-service={http,https} --permanent
FirewallD is not running
[root@powerdns-teguht html]#  firewall-cmd --reload
FirewallD is not running
[root@powerdns-teguht html]#

5. Create user mariadb for poweradmin

GRANT SELECT, INSERT, UPDATE, DELETE
ON powerdns.*
TO 'teguht'@'localhost'
IDENTIFIED BY 'teguhtlab';

[root@powerdns-teguht html]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 16
Server version: 5.5.60-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> GRANT SELECT, INSERT, UPDATE, DELETE
    -> ON powerdns.*
    -> TO 'teguht'@'localhost'
    -> IDENTIFIED BY 'teguhtlab';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit
Bye
[root@powerdns-teguht html]#

6. configure config.inc.php

[root@powerdns-teguht inc]# cd /var/www/html/poweradmin/inc
[root@powerdns-teguht inc]# cp config-me.inc.php config.inc.php
[root@powerdns-teguht inc]# pwd
/var/www/html/poweradmin/inc
[root@powerdns-teguht inc]# cat config.inc.php | grep db_
$db_host = 'localhost';
$db_port = '3306';
$db_user = 'teguht';
$db_pass = 'teguhtlab';
$db_name = 'powerdns';
$db_type = 'mysql';
//$db_file        = '';        # used only for SQLite, provide full path to database file
//$db_debug        = false;    # show all SQL queries
$db_layer        = 'PDO';    # or MDB2
//$db_ssl_ca            = '';
[root@powerdns-teguht inc]#

[root@powerdns-teguht inc]# cd /var/www/html/poweradmin/inc
[root@powerdns-teguht inc]# cat config.inc.php | grep dns_
$dns_hostmaster = 'root.teguht.com';
$dns_ns1 = 'ns1.teguht.com';
$dns_ns2 = 'ns2.teguht.com';
$dns_ttl = 86400;
$dns_fancy = false;
$dns_strict_tld_check = false;
$dns_top_level_tld_check = false;     // Don't allow to create top level TLDs
$dns_third_level_check = false;
[root@powerdns-teguht inc]#
[root@powerdns-teguht inc]#

7. Configuring Timezone
[root@powerdns-teguht inc]# cat /etc/php.ini | grep date.time
; http://php.net/date.timezone
;date.timezone =
date.timezone ="Asia/Jakarta"
[root@powerdns-teguht inc]# systemctl restart httpd


8. disable encryption &

Error: Default session encryption key is used, please set it in your configuration file.

[root@powerdns-teguht inc]# cd /var/www/html/poweradmin/inc
[root@powerdns-teguht inc]# openssl rand -base64 32
PxyG5YFAcj1V73E7hjnK4tpkNSn65p5p30IgwTToGzc=
[root@powerdns-teguht inc]#

[root@powerdns-teguht inc]# cat config.inc.php | grep session_key
#$session_key = 'p0w3r4dm1n';
$session_key = 'PxyG5YFAcj1V73E7hjnK4tpkNSn65p5p30IgwTToGzc=';
[root@powerdns-teguht inc]#
[root@powerdns-teguht inc]#

8. Configure poweradmin using web gui

http://powerdns-teguht/poweradmin/install/













9.remove folder install
[root@powerdns-teguht poweradmin]# cd /var/www/html/poweradmin
[root@powerdns-teguht poweradmin]# cp install/htaccess.dist .htaccess
[root@powerdns-teguht poweradmin]# rm -rf /var/www/html/poweradmin/install/

10. login to  web gui
http://powerdns-teguht/poweradmin/

11. Add zone



12. add Record

13. Testing
C:\Users\teguh.triharto>dig @10.10.10.200 nms.teguht.com

; <<>> DiG 9.14.4 <<>> @10.10.10.200 nms.teguht.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26353
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1680
;; QUESTION SECTION:
;nms.teguht.com.                        IN      A

;; ANSWER SECTION:
nms.teguht.com.         86400   IN      CNAME   10.10.10.240.

;; Query time: 9 msec
;; SERVER: 10.10.10.200#53(10.10.10.200)
;; WHEN: Thu Aug 22 15:35:32 SE Asia Standard Time 2019
;; MSG SIZE  rcvd: 70


C:\Users\teguh.triharto>


C:\Users\teguh.triharto>nslookup
Default Server:  jktdpictad01.datacomm.co.id
Address:  10.10.10.100

> server 10.10.10.200
Default Server:  [10.10.10.200]
Address:  10.10.10.200

> nms
Server:  [10.10.10.200]
Address:  10.10.10.200

*** [10.10.10.200] can't find nms: Query refused
> nms.teguht.com
Server:  [10.10.10.200]
Address:  10.10.10.200

Name:    nms.teguht.com
Address:  10.10.10.240

> 10.10.10.240
Server:  [10.10.10.200]
Address:  10.10.10.200

> exit

C:\Users\teguh.triharto>

No comments:

Post a Comment

Popular Posts