简介
Monitorix是一个Linux下轻量级的系统监控软件,它使用三个图表让你对系统信息一目了然:中央左边的图表提供信息概览和右边两个较小的图表提供相关细节信息。它还包含一个Perl守护进程,能够收集系统的统计信息,还包含一个CGI网络界面使你可以分析数据。
安装
Fedora
Fedora下只需要运行以下命令就可以安装:
[code lang="bash"]yum install -y monitorix[/code]
CentOS
跟Fedora下不同,在CentOS下首先需要安装一些依赖包环境才可以安装,这些依赖包可以直接通过网络安装:
[code lang="bash"]yum install rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI perl-DBI perl-XML-Simple perl-Config-General perl-HTTP-Server-Simple perl-IO-Socket-SSL[/code]
接下来导入EPEL
国内源:
[code lang="bash"]rpm -ivh http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm #Centos6 32bits
rpm -ivh http://mirrors.yun-idc.com/epel/6/x86_64/epel-release-6-8.noarch.rpm #Centos6 64bits
rpm -ivh http://mirrors.yun-idc.com/epel/5/i386/epel-release-5-4.noarch.rpm # Centos5 32bits
rpm -ivh http://mirrors.yun-idc.com/epel/5/i386/epel-release-5-4.noarch.rpm #Centos5 64bits[/code]
国外源:
[code lang="bash"]rpm -ivh http://archive.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm #Centos6 32bits
rpm -ivh http://archive.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm #Centos6 64bits
rpm -ivh http://archive.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm # Centos5 32bits
rpm -ivh http://archive.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm #Centos5 64bits[/code]
最后安装程序包:
[code lang="bash"]rpm -ivh http://www.monitorix.org/monitorix-n.n.n-1.noarch.rpm # ( n.n.n 代表最新版本)[/code]
比如我的这次安装运行的命令就是:
[code lang="bash"]rpm -ivh http://www.monitorix.org/monitorix-3.4.0-1.noarch.rpm[/code]
Debian
有两种方法,第一种就是像Fedora一样直接自动配置安装,另外一种就是类似于CentOS一样,首先安装依赖,然后在安装deb安装包。
第一种:
[code lang="bash"]apt-get update
apt-get install monitorix[/code]
第二种:
[code lang="bash"]apt-get update
apt-get install rrdtool perl libwww-perl libmailtools-perl libmime-lite-perl librrds-perl
libdbi-perl libxml-simple-perl libhttp-server-simple-perl libconfig-general-perl
wget http://www.monitorix.org/monitorix_3.4.0-izzy1_all.deb
dpkg -i monitorix*.deb
apt-get -f install[/code]
启动
根据官网介绍,CentOS/RedHat/Fedora跟Debian/Ubuntu有一些不同,我们分开讲一下:
CentOS
CentOS/RedHat/Fedora安装完毕以后运行以下命令就可以启动:
[code lang="bash"]service monitorix start[/code]
默认路径
/usr/share/monitorix/
首页修改
/usr/share/monitorix/cgi/monitorix.cgi
参数配置
/etc/monitorix.conf
然后通过
http://ip:8080/monitorix/
访问web界面。
Debian
由于在安装的时候需要重新配置Apache服务器,所以Debian/Ubuntu安装完毕以后还需要重启一下Apache服务器。
[code lang="bash"]service apache2 reload[/code]
然后再启动monitorix服务。
参数配置
/etc/monitorix.conf
然后通过
http://localhost/monitorix/
访问web界面,因为默认Debian/Ubuntu只能本地才能访问,如果想让远程访问,必须重新修改配置文件。将IP地址添加到'Allow from'语句。请参阅如下例子。
[code lang="bash"]<Directory /usr/share/monitorix/cgi-bin/>
DirectoryIndex monitorix.cgi
Options ExecCGI
Order Deny,Allow
Deny from all
Allow from 192.168.1.123
</Directory>[/code]
接下来运行以下命令重启monitorix服务和Apache服务。
[code lang="bash"]service monitorix restart
service apache2 reload[/code]
截图
由于我刚安装完毕程序,还没有数据显示,需要看截图的朋友可以通过以下两个网站查看:
官网:http://www.monitorix.org/screenshots.html
tecmint.com:http://www.tecmint.com/monitorix-a-lightweight-system-and-network-monitoring-tool-for-linux/
此处评论已关闭