[root@hdss7-11 ~]# systemctl enable mariadb Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@hdss7-11 ~]# cd /usr/share/namedmanager/resources/ [root@hdss7-11 resources]# ./autoinstall.pl autoinstall.pl This script setups the NamedManager database components: * NamedManager MySQL user * NamedManager database * NamedManager configuration files THIS SCRIPT ONLY NEEDS TO BE RUN FOR THE VERY FIRST INSTALL OF NAMEDMANAGER. DO NOT RUN FOR ANY OTHER REASON Please enter MySQL root password (if any): 123456 输入123456 Searching ../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.sql Creating user... Updating configuration file... DB installation complete! You can now login with the default username/password of setup/setup123 at http://localhost/namedmanager
配置namedmanager
config.php,增加一条配置
/etc/namedmanager/config.php
1
$_SERVER['HTTPS'] = "TRUE";
config-bind.php,修改以下三条配置
/etc/namedmanager/config-bind.php
1 2 3 4
$config["api_url"] = "http://dns-manager.od.com/namedmanager"; // Application Install Location $config["api_server_name"] = "dns-manager.od.com"; // Name of the DNS server (important: part of the authentication process) $config["api_auth_key"] = "verycloud"; // API authentication key $config["log_file"] = "/var/log/namedmanager_bind_configwriter";
php.ini,修改一条配置
/etc/php.ini
1 2
; How many GET/POST/COOKIE input variables may be accepted max_input_vars = 10000
绑host(临时)
/etc/hosts
1
10.4.7.11 dns-manager.od.com
配apache
/etc/httpd/conf/httpd.conf
1 2 3 4 5 6 7
Listen 10.4.7.11:8080 ServerName dns-manager.od.com <Directory /> AllowOverride none allow from all #Require all denied </Directory>
[root@hdss7-11 ~]# systemctl start httpd [root@hdss7-11 ~]# systemctl enable httpd Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
启动nginx
1 2 3 4
[root@hdss7-11 ~]# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful [root@hdss7-11 ~]# nginx
[root@hdss7-11 resources]# systemctl enable supervisord Created symlink from /etc/systemd/system/multi-user.target.wants/supervisord.service to /usr/lib/systemd/system/supervisord.service.
[root@hdss7-11 resources]# tail -fn 200 /var/log/namedmanager_logpush Error: Unable to authenticate with NamedManager API - check that auth API key and server name are valid
options { listen-on port 53 { 10.4.7.11; }; 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 { any; }; allow-transfer { 10.4.7.12; }; also-notify { 10.4.7.12; }; /* - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion. - If you are building a RECURSIVE (caching) DNS server, you need to enable recursion. - If your recursive DNS server has a public IP address, you MUST enable access control to limit queries to your legitimate users. Failing to do so will cause your server to become part of large scale DNS amplification attacks. Implementing BCP38 within your network would greatly reduce such attack surface */ recursion yes; dnssec-enable no; dnssec-validation no; /* Path to ISC DLV key */ bindkeys-file "/etc/named.iscdlv.key"; managed-keys-directory "/var/named/dynamic"; pid-file "/run/named/named.pid"; session-keyfile "/run/named/session.key"; }; key "rndc-key" { algorithm hmac-sha256; secret "CD/4vqb9l0WiMy5TXjfeu1cMhyRerQ9kL2jwdBFWwa4="; }; controls { inet 10.4.7.11 port 953 allow { 10.4.7.11; } keys { "rndc-key"; }; }; 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";
改named.namedmanager.conf文件属性
/etc/named.namedmanager.conf
1 2 3
[root@hdss7-11 named]# chown apache.apache /etc/named.namedmanager.conf [root@hdss7-11 named]# ls -l /etc/named.namedmanager.conf -rw-r--r-- 1 apache named 112 Dec 16 11:19 /etc/named.namedmanager.conf
// // NamedManager Configuration // // This file is automatically generated any manual changes will be lost. // zone "od.com" IN { type master; file "od.com.zone"; allow-update { none; }; }; zone "host.com" IN { type master; file "host.com.zone"; allow-update { none; }; }; zone "7.4.10.in-addr.arpa" IN { type master; file "7.4.10.in-addr.arpa.zone"; allow-update { none; }; };
Automatically hide the options table when using defaults 默认勾选,高级查询框显示与否
option_debug
Enable debug logging - this will impact performance a bit but will show a full trail of all functions and SQL queries made 默认不勾,勾选上可以在页面显示debug日志,建议部署时使用,投产后关闭
option_concurrent_logins
Permit this user to make multiple simultaneous logins 默认不勾,允许该用户在多点同时登录,应该严格禁止(审计)