{"id":6586,"date":"2016-01-27T16:54:17","date_gmt":"2016-01-27T08:54:17","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=6586"},"modified":"2023-04-28T09:47:08","modified_gmt":"2023-04-28T09:47:08","slug":"install-and-setup-munin-on-centos-7","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/install-and-setup-munin-on-centos-7\/","title":{"rendered":"How to Install and Setup Munin on CentOS 7"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignnone wp-image-6588 size-full lazyload\" data-src=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/01\/munin-centos7-2.jpg\" alt=\"Munin on CentOS 7\" width=\"1280\" height=\"720\" data-srcset=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/01\/munin-centos7-2.jpg 1280w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/01\/munin-centos7-2-300x169.jpg 300w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/01\/munin-centos7-2-768x432.jpg 768w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/01\/munin-centos7-2-1024x576.jpg 1024w\" data-sizes=\"(max-width: 1280px) 100vw, 1280px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1280px; --smush-placeholder-aspect-ratio: 1280\/720;\" \/><\/p>\n<p><a href=\"https:\/\/munin-monitoring.org\/\" target=\"_blank\" rel=\"nofollow noopener\">Munin<\/a> is open source and free software for monitoring computer system, network monitoring and application infrastructure monitoring software. Munin offers monitoring and alerting for servers, switches, applications, and services.<\/p>\n<p>Munin can help system administrators to analyze the trend of the computer system whether it is experiencing problems or not. It can be an easier alternative to the popular open-source software <a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-install-zabbix-2-2-server-on-centos-6-5\/\" target=\"_blank\" rel=\"noopener\">zabbix monitoring.<\/a><\/p>\n<p>In this article, I will explain how you can monitor your linux CentOS with Munin and the simple steps to install and setup Munin on CentOS 7.<\/p>\n<h2>Steps to Install and Setup Munin on CentOS 7<\/h2>\n<p>1. Enable or install the EPEL Repository into CentOS 7. Read more on <a href=\"https:\/\/webhostinggeeks.com\/howto\/epel-yum-repository-on-linux\/\" target=\"_blank\" rel=\"noopener\">how to Enable EPEL Repository on CentOS 7 \/ RHEL 7<\/a><\/p>\n<p>2. Munin requires a web server to run. In this article, we will use apache. Install apache, Munin and Munin Node with yum command :<\/p>\n<pre># <strong>yum install httpd munin munin-node -y\n<\/strong><\/pre>\n<p>3. Start and enable apache and munin at boot.<\/p>\n<pre># systemctl start httpd\n# systemctl enable httpd\n# systemctl start munin-node\n# systemctl enable munin-node\n<\/pre>\n<p>4. We want munin to use the name centos72.ehowstuff.local instead of localhost. Please open edit the setting in \/etc\/munin\/munin.conf<\/p>\n<pre># <strong>vim \/etc\/munin\/munin.conf\n<\/strong><\/pre>\n<p>Original :<\/p>\n<pre>[localhost]\n    address 127.0.0.1\n    use_node_name yes\n<\/pre>\n<p>Change to :<\/p>\n<pre>[centos72.ehowstuff.local]\n    address 127.0.0.1\n    use_node_name yes\n<\/pre>\n<p>5. You also have optional to change the munin node hostname :<\/p>\n<pre># <strong>vim \/etc\/munin\/munin-node.conf\n<\/strong><\/pre>\n<p>Original :<\/p>\n<pre>host_name localhost.localdomain\n<\/pre>\n<p>Change to :<\/p>\n<pre>host_name centos72.ehowstuff.local\n<\/pre>\n<p>6. Next go to the Apache virtual host configuration file to add the permission to access your network.<\/p>\n<pre># <strong>vim \/etc\/httpd\/conf.d\/munin.conf\n<\/strong><\/pre>\n<p>Add network segment that you allow to access to the CentOS server.<\/p>\n<pre>AuthUserFile \/etc\/munin\/munin-htpasswd\nAuthName \"Munin\"\nAuthType Basic\nrequire valid-user\n\nOrder Deny,Allow\nDeny from all\nAllow from 127.0.0.1 192.168.0.0\/24\n..\n..\n<\/pre>\n<p>7. Munin statistics page shall be protected by a username and password. We can add the new user (admin) and password to \/etc\/munin\/munin-htpasswd with htpasswd command line. So we have to setup basic Apache authentication before we can start access the munin\u00a0statistic page.<\/p>\n<pre># <strong>htpasswd \/etc\/munin\/munin-htpasswd admin<\/strong>\nNew password:\nRe-type new password:\nAdding password for user admin\n<\/pre>\n<p>8. Allow port 80 in the firewalld permanently. learn more <a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-configure-firewalld-in-linux\/\" target=\"_blank\" rel=\"noopener\">how to configure Firewalld\u00a0on CentOS 7<\/a>.<\/p>\n<p>a) Get default zone :<\/p>\n<pre># <strong>firewall-cmd --get-active-zones<\/strong>\npublic\n  interfaces: ens160\n<\/pre>\n<p>b) Allow port 80 permanently in firewalld :<\/p>\n<pre># <strong>firewall-cmd --permanent --zone=public --add-port=80\/tcp<\/strong>\nsuccess\n<\/pre>\n<p>c) reload the setting to take effect immediately :<\/p>\n<pre># <strong>firewall-cmd --reload<\/strong>\nsuccess\n<\/pre>\n<p>d) List all active firewalld configuration :<\/p>\n<pre># <strong>firewall-cmd --list-all<\/strong>\npublic (default, active)\n  interfaces: ens160\n  sources:\n  services: dhcpv6-client ssh\n  ports: 80\/tcp\n  masquerade: no\n  forward-ports:\n  icmp-blocks:\n  rich rules:\n<\/pre>\n<p>9. Try access munin statistic page from client.<\/p>\n<p><strong>http:\/\/192.168.0.14\/munin<\/strong><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-6587 size-full lazyload\" data-src=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/01\/munin-centos7-1.png\" alt=\"Munin on CentOS 7\" width=\"1216\" height=\"729\" data-srcset=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/01\/munin-centos7-1.png 1216w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/01\/munin-centos7-1-300x180.png 300w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/01\/munin-centos7-1-768x460.png 768w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2016\/01\/munin-centos7-1-1024x614.png 1024w\" data-sizes=\"(max-width: 1216px) 100vw, 1216px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1216px; --smush-placeholder-aspect-ratio: 1216\/729;\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Munin is open source and free software for monitoring computer system, network monitoring and application infrastructure monitoring software. Munin offers monitoring and alerting for servers, switches, applications, and services. Munin&#8230;<\/p>\n","protected":false},"author":6,"featured_media":6588,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[1066],"tags":[1258,1975,1536],"class_list":["post-6586","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-system-performance","tag-centos-7","tag-install","tag-linux"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/6586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=6586"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/6586\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/6588"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=6586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=6586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=6586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}