如何在CentOS/Red Hat/Fedora 中安装Munin(网络监视工具)

Munin是一个网络资源监控工具,可以方便的分析资源状况。 Munin监测工具分析监测的所有的计算机信息都会记录下来。它提出所有信息的图表可以通过Web界面查看。 本文将帮助你在系统上安装Munin。
第1步:设置EPEL库
首先,需要在我们的系统中添加EPEL软件库。按系统架构使用下面的命令来安装。
# yum install epel-release
第2步:安装Munin包
使用下面的命令来安装Munin和所需的软件包
# yum --enablerepo=epel install munin munin-node rrdtool
第3步:配置Apache
默认情况下Munin创建Apache配置文件 /etc/httpd/conf.d/munin.conf。编辑MuninApache配置文件,并添加以下内容。
# vim /etc/httpd/conf.d/munin.conf
Alias /munin /var/www/html/munin
<Directory /var/www/html/munin>
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<directory /var/www/html/munin>
	AuthUserFile /etc/munin/munin-htpasswd
	AuthName "Munin"
	AuthType Basic
	require valid-user

	ExpiresActive On
	ExpiresDefault M310
</directory>
ScriptAlias /munin-cgi/munin-cgi-graph /var/www/cgi-bin/munin-cgi-graph
使用下面的命令创建 Munin htpasswd
# htpasswd -cm /etc/munin/munin-htpasswd muninadmin
New password:
Re-type new password:
上面创建的登录信息,将用来访问MuninWeb界面用。
第4步:重新启动服务
首先启动Munin节点服务,并配置为自动启动在系统启动。
# /etc/init.d/munin-node start
# chkconfig munin-node on
重新启动Apache服务
# service httpd restart
第5步:进入MuninWeb界面
在浏览器中打开下面的URL访问MuninWeb界面。根据您的设置更改 IP/域名。
http://192.168.1.100/munin
or
http://svr2.youcl.com/munin
等待大约一小时的记录,进入Web界面来查看Munin图。 有关详细信息和Munin的配置请参考以下链接 http://munin.readthedocs.org/en/latest/ http://munin.readthedocs.org/en/latest/installation/configuration.html
赞(52) 打赏
未经允许不得转载:优客志 » 系统运维
分享到:

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏