BLOG数据载入中...
MRTG 2.16.1 Linux/Unix Installation Guide
By  wenmu 发表于 2008-4-1 9:47:16 

DESCRIPTION
MRTG comes to you in Source Code. This means that you have to compile parts of it before you can use it on a Unix machine. These instructions help you to do so.

PREPARATION

GCC
 http://gcc.gnu.org/

Perl
 http://www.perl.com/

gd
 http://www.boutell.com/gd/

libpng
 http://www.libpng.org/pub/png/libpng.html

zlib
 http://www.gzip.org/zlib

mrtg
 http://oss.oetiker.ch/mrtg/pub

LIBRARY COMPILATION
查询系统是否安装有这些软件包:
rpm -qa|grep gd
如果有没有安装的软件包,可参见相应软件包的安装说明。

Apache的安装
tar xvfz httpd-2.9.17.tar.gz
cd httpd-2.9.17
./configure --prefix=/usr/local/httpd
make
make install
运行Apache
/usr/local/httpd/bin/apachectl start

MRTG COMPILATION
tar xvfz mrtg-2.9.17.tar.gz
cd mrtg-2.9.17
./configure --prefix=/usr/local/mrtg2
make
make install

Otherwise you may have to give some hints on where to find the various libraries required to compile mrtg:
 ./configure --prefix=/usr/local/mrtg2       \
             --with-gd=/usr/local/src/gd      \
             --with-z=/usr/local/src/zlib     \
             --with-png=/usr/local/src/libpng

All the software required by MRTG is now installed under the /usr/local/mrtg2 subdirectory.

CONFIGURATION
You can find the script in the bin subdirectory(/usr/local/mrtg2/bin).

./cfgmaker --global 'Options[_]:bits,transparent,nobanner,unknaszero,nolegend' \
--global 'WorkDir:/usr/local/httpd/htdocs/mrtg' \
--output /etc/mrtg/mrtg.cfg \
--global 'language:chinese' \
aaa@abc.com

RUNNING MRTG
Once you have created a configuration file, try the following:

 /usr/local/mrtg2/bin/mrtg /etc/mrtg/mrtg.cfg

if you live in Linux Land the line may look like this if you are using crontab -e

 */5 * * * *  /usr/local/mrtg2/bin/mrtg /etc/mrtg/mrtg.cfg

制作监控中心
/usr/local/mrtg2/bin/indexmaker /etc/mrtg/mrtg.cfg > /usr/local/httpd/htdocs/mrtg/index.htm

 
阅读全文 | 回复(0) | 引用通告 | 编辑

发表评论:

    昵称:
    密码: (游客无须输入密码)
    主页:
    标题:
    BLOG数据载入中...

 
站点公告
BLOG数据载入中...
站点日历
BLOG数据载入中...
最新日志
BLOG数据载入中...
最新评论
BLOG数据载入中...
最新留言
BLOG数据载入中...
友情链接
站点统计
BLOG数据载入中...
日志搜索
用户登陆

 
首页 | 论坛 | 博客 | 登陆 | 注册 | 相册 | 精华 | Tags