Dikarenakan ada teman yang meminta artikel membuat MRTG di Linux akhirnya gw tulis deh, sebelumnya siapkan hati dan pikiran anda he.he..he.. , ok lansung aja caranya seperti ini :
Requierment :
- Install snmpd
- Install apache
- Install gcc
- Install SNMP ( kalo di Suse lewat yast aja )
- Config file /etc/snmp.conf seperti di bawah ini :
- Jalankan snmp nya #/etc/init.d/snmpd start
- Download dan compile software2 ini :
syslocation Router ( nama router anda )
syscontact Sysadmin (root@localhost)
com2sec public default public
group public v1 public
group public v2c public
group public usm public
view all included .1
access public “” any noauth exact all none none
- Buat direktori penampung dulu yah :
- Installed zlib
- Installed libpng
- Compile gd
- Compilation MRTG ( Download MRTG simpan di /usr/local/src )
- Configuration MRTG
# mkdir -p /usr/local/src
# cd /usr/local/src
# wget http://www.gzip.org/zlib/zlib-1.1.4.tar.gz
# gunzip -c zlib-1.1.4.tar.gz | tar xf -
# rm zlib-1.1.4.tar.gz
# mv zlib-1.1.4 zlib
# cd zlib
# ./configure
# make
# cd ..
# wget http://public.planetmirror.com/pub/sourceforge/l/li/libpng/libpng-1.0.15.tar.gz
# gunzip -c libpng-1.0.15.tar.gz |tar xf -
# rm libpng-1.0.15.tar.gz
# mv libpng-1.0.15 libpng
# cd libpng
# make -f scripts/makefile.std CC=gcc ZLIBLIB=../zlib ZLIBINC=../zlib
# rm *.so.* *.so
# cd ..
# wget http://www.boutell.com/gd/http/gd-2.0.11.tar.gz
# gunzip -c gd-2.0.11.tar.gz |tar xf -
# mv gd-2.0.11 gd
# cd gd
# env CPPFLAGS=”-I../zlib -I../libpng” LDFLAGS=”-L../zlib -L../libpng” ./configure –disable-shared –without-freetype –without-jpeg
# make
# cp .libs/* .
# perl -i~ -p -e s/gd_jpeg.o//g Makefile make INCLUDEDIRS=”-I. -I../zlib -I../libpng” LIBDIRS=”-L../zlib -L. -L../libpng” LIBS=”-lgd -lpng -lz -lm” CFLAGS=”-O -DHAVE_LIBPNG”
# cd ..
# cd /usr/local/src
# gunzip -c mrtg-2.14.4.tar.gz | tar xvf -
# mv mrtg-2.14.4 mrtg-2
# cd mrtg-2
# ./configure –prefix=/usr/local/mrtg-2 –with-gd=/usr/local/src/gd –with-z=/usr/local/src/zlib –with-png=/usr/local/src/libpng
# make
# make install
# /usr/local/mrtg-2/bin/cfgmaker –global ‘WorkDir: /srv/www/htdocs/mrtg’ –global ‘Options[_]: bits,growright’ –output /srv/www/htdocs/mrtg/cfg/mrtg.cfg public@localhost
note : /srv/www/htdocs adalah tempat direktori utama peyimpanan dokumen web ( sesuaikan dengan Config apache anda, sebelumnya buat dulu direktori mrtg di /srv/www/htdocs dan direktori cfg di /srv/www/htdocs/mrtg )
- Jalankan MRTG
- Masukin konfigurasi ini di mrtg.cfg
- Agar automatis start :
RunAsDaemon : Yes
- Agar update tiap 5 menit :
Interval : 5
- Agar auto refresh pada web browser :
Refresh : 300M - Buat indexmaker
# /usr/local/mrtg-2/bin/mrtg /srv/www/htdocs/mrtg/cfg/mrtg.cfg
# /usr/local/mrtg-2/bin/indexmaker /srv/www/htdocs/mrtg/cfg/mrtg.cfg > /srv/www/htdocs/mrtg/index.html
0 komentar:
Post a Comment