Namedmanager Function
Use the new Amberphplib framework and be compatible with MySQL 5.6 strict SQL Mode
Is a Web-based DNS management system that can be used to add, adjust, and delete DNS zones/records data. It supports Bind as the backend DNS service and IPv4 and IPv6.
Namedmanager Software Installation Method
Download repository address
wget -O /etc/yum.repos.d/amberdms-c6-public.repo http://repos.jethrocarr.com/config/centos/6/amberdms-c6-public.repo
Install the namedmanager package
[root@station140 rpm]# yum -y install namedmanager*
Pay attention to installation information
BIND/NAMED CONFIGURATIONNamedManager BIND components have been installed, you will need to installand configure bind/named to use the configuration file by adding thefollowing to /etc/named.conf:## Include NamedManager Configuration#include "/etc/named.namedmanager.conf";NAMEDMANAGER BIND CONFIGURATIONYou need to set the application configuration in /etc/namedmanager/config-bind.php
Tip: Now you need to modify named. conf, add include "/etc/named. namedmanager. conf"; Syntax, also php Management page need to configure/etc/namedmanager/config-bind.php File
Refer to the main configuration files and functions
Path |
Details |
/Etc/namedmanager/ |
Configuration directory for NamedManager |
/Etc/cron. d/namedmanager-bind |
NamedManager cronjobs |
/Etc/init. d/namedmanager_logpush |
Bootscript for starting/stopping the log collector |
/Etc/named. conf |
Default name for your Bind name server configuration file. |
/Var/named/chroot/etc/named. conf |
Using bind-chroot. |
Description of scheduled tasks under crond. d
/Etc/cron. d/namedmanager-bind
# check for new configuration every minute*/1 * * * * root php -q /usr/share/namedmanager/bind/namedmanager_bind_configwriter.php >> /var/log/namedmanager_bind_configwriter# PHP slowly leaks memory, restart the process weekly to prevent it getting too large over months01 01 * * 0 root /etc/init.d/namedmanager_logpush restart >> /dev/null 2>&1
Refresh the DNS data in mysql every minute and record it to the log.
Modify file attributes
[root@station149 etc]# chkconfig --level 35 namedmanager_logpush on[root@station149 etc]# chown named.root /etc/named.namedmanager.conf
Check whether the namedmanager configuration file is correct
php -q /usr/share/namedmanager/bind/namedmanager_bind_configwriter.php
Database Configuration
Start Database
[Root @ station 149 RPM] # service mysqld start
Initialize the MySQL database: Installing MySQL system tables... OKFilling help tables... OKPlease report any problems with the/usr/bin/mysqlbug script! [OK] Starting mysqld: [OK]
Update the MySQL administrator password
[root@station149 resources]# mysqlmysql> update mysql.user set password=password('mypasswd') where user='root';Query OK, 3 rows affected (0.00 sec)Rows matched: 3 Changed: 3 Warnings: 0mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)
Load the namedmanager table to the database
[root@station149 rpm]# cd /usr/share/namedmanager/resources/; ./autoinstall.plautoinstall.plThis script setups the NamedManager database components: * NamedManager MySQL user * NamedManager database * NamedManager configuration filesTHIS SCRIPT ONLY NEEDS TO BE RUN FOR THE VERY FIRST INSTALL OF NAMEDMANAGER.DO NOT RUN FOR ANY OTHER REASONPlease enter MySQL root password (if any): mypasswdSearching ../sql/ for latest install schema...../sql//version_20131222_install.sql is the latest file and will be used for the install.Importing file ../sql//version_20131222_install.sqlCreating user...Updating configuration file...DB installation complete!You can now login with the default username/password of setup/setup123 at http://localhost/namedmanager
BIND server configuration
Install the bind Service
[root@terry resources]# yum install -y bind-*
Configure bind
[root@terry resources]# cp -p /etc/named.namedmanager.conf /var/named/chroot/etc/[root@terry resources]# vi /var/named/chroot/etc/named.conf
Named. conf file content
options { listen-on port 53 { 0.0.0.0; };// listen-on-v6 port 53 { ::1; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { 0.0.0.0; }; recursion yes; dnssec-enable yes; dnssec-validation yes; dnssec-lookaside auto; /* Path to ISC DLV key */ bindkeys-file "/etc/named.iscdlv.key"; managed-keys-directory "/var/named/dynamic";};logging { channel default_debug { file "data/named.run"; severity dynamic; };};zone "." IN { type hint; file "named.ca";};include "/etc/named.rfc1912.zones";include "/etc/named.root.key";include "/etc/named.namedmanager.conf";
Start the bind Service
[root@terry resources]# service named start
Http + php startup
[Root @ terry resources] # vi/etc/namedmanager/config-bind.php
<? Php/* Sample Configuration File Copy this file to config-settings.php This file shocould be read-only to the user whom the bind configuration scripts are running. * // * API Configuration */$ config ["api_url"] = "http: // 192.168.48.141/namedmanager "; // Application Install Location $ config ["api_server_name"] = "station141.vtest.com"; // [host name required] $ config ["api_auth_key"] = "mykey "; // [this key is defined at will]/* Log file t O find messages from Named. note that: * File shocould be in syslog format * Named Manager uses tail-f to read it, this can break with logrotate-make sure that either "copytruncate" mode is used, or tail processes are killed */$ config ["log_file"] = "/var/log/messages";/* Lock File Used to prevent clashes when multiple instances are accidently run. */$ config ["lock_file"] = "/var/lock/namedmanager_lo Ck "; $ config [" bind "] [" version "] =" 9 "; // version of bind (currently only 9 is supported, although others may work) $ config ["bind"] ["reload"] = "/usr/sbin/rndc reload "; // command to reload bind config & zonefiles $ config ["bind"] ["config"] = "/var/named/chroot/etc/named. namedmanager. conf "; // configuration file to write bind config too $ config [" bind "] [" zonefiledir "] ="/var/named/chroot/var/named /";/ /Directory to write zonefiles too // note: if using chroot bind, will often be/var/named/chroot/var/named/$ config ["bind"] ["verify_zone"] = "/usr/sbin/named-checkzone "; // Used to verify each generated zonefile as OK $ config ["bind"] ["verify_config"] = "/usr/sbin/named-checkconf "; // Used to verify generated NamedManager configuration/* Unusual Compatibility Options * // Include a full path to Zonefiles in Bind-useful if Bind lacks a // directory configuration or you really, really to store you zonefiles // in a different location // $ config ["bind"] ["zonefullpath"] = "on "; // force debugging on for all users + scripts // (note: debugging can be enabled on a per-user basis by an admin via the web interface) // $ _ SESSION ["user"] ["debug"] = "on";?>
Create the named. namedmanager. conf file.
[root@terry resources]# cp /etc/named.namedmanager.conf /var/named/chroot/etc/[root@terry resources]# chown named:named /var/named/chroot/etc/named.namedmanager.conf
Start apache server
[Root @ terry resources] # service httpd restart
Stop httpd: [OK]
Starting httpd: [Thu Jan 16 15:12:12 2014] [warn] Useless use of AllowOverride in line 11 of/etc/httpd/conf. d/namedmanager. conf.
[OK]
Start the Web server http: // 192.168.48.141/namedmanager for Logon test (default: setup/setup123)
Reference graphic configuration method
Select configuration,
Fill in administrator email (terry@station141.vtest.com)
Enter ADMIN_API_KEY (the key defined in/var/named/chroot/etc/named. namedmanager. conf)
Choose Domains/zones-> View Domains and Add a New Domain by adding New Domain.
Adding a domain
Configure dns fqdn as the DNS server host name in the current domain
Select the server type, [API]
Enter the ADMIN_API_KEY again
Define the current host as the DNS master server
Make sure that the last green part is in the configuration file synchronization. If the configuration file is not displayed in green, you need to troubleshoot the problem further.
See, added domain
Method for adding host A record
Add reverse resolution domain again
Add reverse resolution PTR record Method