Unbound + Munin self-built DNS resolution System

Source: Internet
Author: User
Tags openssl version

Unbound is a good recursive DNS software. Munin is a free statistical software that can be used with Apache for graphical monitoring and supports the unbound plug-in module, it can also monitor various Server metrics. The following describes the unbound + Munin website creation method.

Test Environment: Centos 6.4x86 unbound-1.4.22.tar.gz

[Part 1 install and configure unbound]
(1) decompress the unbound source code package
(2) enter the source code package and run./configure -- prefix =/usr/local/unbound.
(3) execute make
(4) execute make install
Note:
A. If configure prompts: Configure: Error: openssldoes not support ECC, needed for GOST support
Because the OpenSSL version is too low, please use Yum to upgrade the OpenSSL of the Local Machine
B. The operating system installs the expat RPM package by default, but the Lib library package is missing. Therefore, configure may also prompt configureerror cocould not find expat H
Please install expat-devel-2.0.1-11.el6_2.x86_64.rpm
(5) Go to the/usr/local/unbound directory and you can see the following directory:
[[Email protected] sbin] # cd/usr/local/unbound/
[[Email protected] unbound] # ls

ETC include lib sbin share
(6) Go to etc and execute wget ftp://ftp.internic.net/domain/named.cache
(7) modify the vimunbound. conf file as follows:

Interface: 0.0.0.0

Port: 53

Do-ip4: Yes

Do-ip6: Yes

Do-udp: Yes

Do-TCP: Yes

Do-daemonize: Yes

Access-control: 0.0.0.0/0 allow

Chroot: "/usr/local/unbound/etc/Unbound"

Username: "root"

Directory: "/usr/local/unbound/etc/Unbound"

Use-syslog: Yes

Pidfile: "/usr/local/unbound/etc/unbound. PID"

Root-hints: "/usr/local/unbound/etc/unbound/named. cache"

Rrset-roundrobin: Yes

Minimal-responses: No

Control-Enable: Yes

Control-Port: 8953

Control-key-file: "/usr/local/unbound/etc/unbound/unbound_control.key"

Control-cert-file: "/usr/local/unbound/etc/unbound/unbound_control.pem"
(8) CD/usr/local/unbound/sbin
Run./unbound-checkconf/usr/local/unbound/etc/unbound. conf.
Confirm that no errors in/usr/local/unbound/etc/unbound. conf is output.
Run./unboun-control-Setup
(9) Run./unbound-D-C/usr/local/unbound/etc/unbound. conf &
PS-Ef | grepunbound confirm unbound
Netstat-nap | grep 53 confirm unbound
Note: If you want to use the unbound-control script for control, you need to set the environment variables. Otherwise, execute./unbound-control start to start the process, and the system prompts fatal error: couldnot exec Unbound: no such file or directory.
The setting method is as follows:

CD/usr/local/unbound/sbin

Vim ~ /. Bashrc

Add: exportpath =/usr/local/unbound/sbin/: $ path at the bottom.
(10) Use dig @ localhost to test domain name resolution

[Part 2 install and configure Munin]
(1) Use Yum to install Munin, Munin-node, httpd, and unbound-Munin
[[Email protected] plugins] # rpm-Qa | grep Munin

Munin-common-2.0.20-1.el6.noarch

Munin-node-2.0.20-1.el6.noarch

Munin-2.0.20-1.el6.noarch
Unbound-munin-1.4.21-1.el6.noarch
(2) initialize the Munin and httpd configurations.
CD/etc/Munin
The cancellation comments of VIM Munin. conf are as follows:

650) This. width = 650; "Title =" 222.png" src = "http://s3.51cto.com/wyfs02/M00/4C/C5/wKiom1RFL_rAsMORAABwF6OAj8Q558.jpg" alt = "wkiom1rfl_rasmoraabwf6oaj8q558.jpg"/>

Keep the default settings for other configurations.
CD/etc/httpd/CONF. d/
Vim Munin. conf

650) This. width = 650; "Title =" 223.png" src = "http://s3.51cto.com/wyfs02/M01/4C/C6/wKioL1RFMHeifCueAADSESQxGTw489.jpg" alt = "wkiol1rfmheifcueaadsesqxgtw489.jpg"/>

Save and exit
Run htpasswd-CM/etc/Munin-htpasswd ZSF to set the password.
Then run/etc/init. d/Munin-node start and/etc/init. d/httpd start
View the process as follows:

650) This. width = 650; "Title =" 224.png" src = "http://s3.51cto.com/wyfs02/M01/4C/C5/wKiom1RFMFyisKqZAAIeg0Sl6vw298.jpg" alt = "wkiom1rfmfyiskqzaaieg0sl6vw298.jpg"/>

Enter http: // 192.168.187.176/Munin in the Computer Browser

650) This. width = 650; "Title =" 225.png" src = "http://s3.51cto.com/wyfs02/M02/4C/C6/wKioL1RFMNGyxBM1AAEANPf4RgI204.jpg" alt = "wkiol1rfmngyxbm1aaeanpf4rgi204.jpg"/>

Enter the user name ZSF and password

650) This. width = 650; "Title =" 226.png" src = "http://s3.51cto.com/wyfs02/M02/4C/C5/wKiom1RFMKqhZLrIAAGV3DlIdXU682.jpg" alt = "wkiom1rfmkqhzlriaagv3d1_xu682.jpg"/>

 

650) This. width = 650; "style =" width: 678px; Height: 564px; "Title =" 228.png" src = "http://s3.51cto.com/wyfs02/M00/4C/C6/wKioL1RFMRXSRdQ_AAOcUXKKsaU303.jpg" width = "553" Height = "546" alt = "wkiol1rfmrxsrdq_aaocuxksau303.jpg"/>

 

[Part 3: Configure unbound and Munin]
A) Configure Unbound to ensure that the DNS software works properly.

(1) You must enable the remote function to use unbound-control.

650) This. width = 650; "Title =" 229.png" src = "http://s3.51cto.com/wyfs02/M00/4C/C5/wKiom1RFMQ3T2Ui-AACPkKzvfmU567.jpg" alt = "wKiom1RFMQ3T2Ui-AACPkKzvfmU567.jpg"/>

B) CD/usr/share/Munin/plugins/confirm that all unbound-related plug-ins are installed as follows:

650) This. width = 650; "Title =" 331.png" src = "http://s3.51cto.com/wyfs02/M01/4C/C6/wKioL1RFMZWD1L9GAAH6NzRaKKs555.jpg" alt = "wkiol1rfmzwd1l9gaah6nzrakks555.jpg"/>

C) Vim unbound and select e. Edit the script as follows.
Point to the location where the unbound source code package is installed. The default point is the location where the unbound RPM package is installed.

650) This. width = 650; "Title =" 332.png" src = "http://s3.51cto.com/wyfs02/M01/4C/C5/wKiom1RFMYTBimyWAACzUtwFwfQ401.jpg" alt = "wkiom1rfmytbimywaaczutwfwfq401.jpg"/>

D) run the following soft connection command on CD/etc/Munin/plugins:
Ln-S/usr/share/Munin/plugins/unbound_munin_by_class/etc/Munin/plugins/unbound_munin_by_class
Ln-S/usr/share/Munin/plugins/unbound_munin_by_flags/etc/Munin/plugins/unbound_munin_by_flags
Ln-S/usr/share/Munin/plugins/unbound_munin_by_opcode/etc/Munin/plugins/unbound_munin_by_opcode
Ln-S/usr/share/Munin/plugins/unbound_munin_by_rcode/etc/Munin/plugins/unbound_munin_by_rcode
Ln-S/usr/share/Munin/plugins/unbound_munin_by_type/etc/Munin/plugins/unbound_munin_by_type
Ln-S/usr/share/Munin/plugins/unbound_munin_histogram/etc/Munin/plugins/unbound_munin_histogram
Ln-S/usr/share/Munin/plugins/unbound_munin_hits/etc/Munin/plugins/unbound_munin_hits
Ln-S/usr/share/Munin/plugins/unbound_munin_memory/etc/Munin/plugins/unbound_munin_memory
Ln-S/usr/share/Munin/plugins/unbound_munin_queue/etc/Munin/plugins/unbound_munin_queue

650) This. width = 650; "Title =" 333.png" src = "http://s3.51cto.com/wyfs02/M02/4C/C6/wKioL1RFMhvTM_JNAAK8_MDa398185.jpg" width = "732" Height = "117" alt = "wkiol1rfmhvtm_jnaak8_mda398185.jpg"/>

E) CD/etc/Munin/plugin-conf.d
Vim unbound

650) This. width = 650; "Title =" 334.png" src = "http://s3.51cto.com/wyfs02/M01/4C/C6/wKioL1RFMkqAo0vfAADgMdmx1_8525.jpg" alt = "wkiol1rfmkqao0vfaadgmdmxw.8525.jpg"/>

F) Start Munin and httpd.
/Etc/init. d/Munin-node start/etc/init. d/httpd start

G) log on to http: // 192.168.187.169/Munin in the browser and click DNS on the left to view related statistics.

650) This. width = 650; "style =" float: none; "Title =" 335.png" src = "http://s3.51cto.com/wyfs02/M01/4C/C5/wKiom1RFMoHgYMgPAADx5bwHzls330.jpg" alt = "wkiom1rfmohgymgpaadx5bwhzls330.jpg"/>

 

650) This. width = 650; "style =" float: none; "Title =" 336.png" src = "http://s3.51cto.com/wyfs02/M02/4C/C5/wKiom1RFMoGhtNNqAAHeKNKyg30637.jpg" alt = "wkiom1rfmoghtnnqaaheknkyg30637.jpg"/>

 

650) This. width = 650; "style =" float: none; "Title =" 337.png" src = "http://s3.51cto.com/wyfs02/M00/4C/C6/wKioL1RFMsujWKwUAAJCmoLqsQQ830.jpg" alt = "wkiol1rfmsuw.kwuaajcmolqsqq830.jpg"/>

 

650) This. width = 650; "style =" float: none; "Title =" 338.png" src = "http://s3.51cto.com/wyfs02/M00/4C/C5/wKiom1RFMoHTsAZjAAJJNE6w6dc701.jpg" alt = "wkiom1rfmohtsazjaajjne6w6dc701.jpg"/>

 

650) This. width = 650; "style =" float: none; "Title =" 339.png" src = "http://s3.51cto.com/wyfs02/M01/4C/C6/wKioL1RFMsvQ3bArAAGxVCzV4jc723.jpg" alt = "wkiol1rfmsvq3baraagxvczv4jc723.jpg"/>

This article is from the "Zhang helm" blog. For more information, contact the author!

Unbound + Munin self-built DNS resolution System

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.