Instalasi Mrtg
by: ......
siapkan alat dan bahan :
1. net-snmp-5.1.1.tar.gz
2. zlib-1.2.2.tar.gz
3. libpng-1.2.6.tar.gz
4. gd-2.0.11.tar.gz
5. httpd-2.0.50.tar.gz
6. mrtg-2.10.14.tar.gz
A. Tahap Installasi alat dan bahan :
--------------------------------
1. install snmp :
# tar -zxvf net-snmp-5.1.1.tar.gz
# mv net-snmp-5.1.1 snmp
# cd snmp
# ./configure --prefix=/usr/snmpd --with-default-snmp-version=3 --with-sys-contact=error_crush@yahoo.com --with-sys-location=Java --with-logfile=/var/log/snmpd.log --with-persistent-directory=/var/net-snmp
# make
# umask 022
# make install
# mkdir /usr/dotconf
# vi /usr/dotconf/snmpd.conf
###############################################
com2sec pengguna default pengguna
group pengguna v1 pengguna
group pengguna v2c pengguna
group pengguna usm pengguna
view all included .1
community "pengguna"
access pengguna "" any noauth exact all none none
###############################################
# /usr/snmpd/sbin/snmpd -c /usr/dotconf/snmpd.conf
# netstat -pln | grep snmpd
# /usr/snmpd/bin/snmpwalk -v1 -c pengguna localhost system
<-----tahap pengecekan
2.install zlib
# tar -zxvf zlib-1.2.1.tar.gz
# mv zlib-1.2.1 zlib
# cd zlib
# ./configure --prefix=/usr/zlib
# make
# make install
3. install libpng :
# tar -zxvf libpng-1.2.8rc5
# mv libpng-1.2.8rc5 libpng
# cd libpng
# cp scripts/makefile.std makefile
# make install
4. install gd :
# tar -zxvf gd-2.0.32.tar.gz
# mv gd-2.0.32 /usr/gd
# cd gd
# env CPPFLAGS="-I/usr/include/zlib -I/usr/include/libpng" LDFLAGS="-L/usr/include/zlib -L/usr/include/libpng" ./configure --disable-shared --without-freetype --without-jpeg
# make
# make install
5. install httpd :
# tar -zxvf httpd-2.0.50.tar.gz
# mv httpd-2.0.50 httpd
# cd httpd
# ./configure --enable-layout=Solaris
# make
# make install
6. install mrtg :
# tar -zxvf mrtg-2.10.14.tar.gz
# mv mrtg-2.10.14 mrtg
# cd mrtg
# ./configure --prefix=/usr/mrtg --with-gd=/usr/gd --with-z=/usr/zlib --with-png=/usr/include/libpng
# make
# make install
# mkdir /etc/mrtg
# touch /etc/mrtg/server.cfg
# /usr/mrtg/bin/cfgmaker --global 'WorkDir:/var/apache/htdocs/mrtg' --global 'Options[_]: bits,growright' --output /etc/mrtg/server.cfg pengguna@192.168.10.245
7. njalanin mrtg + setting² lainnya
# mkdir /var/apache/htdocs/mrtg
# /usr/mrtg/bin/mrtg /etc/mrtg/server.cfg
# crontab -e
masukan---> */5 * * * * /usr/mrtg/bin/mrtg /etc/mrtg/server.cfg
8. Bikin idex mrtg
#/usr/mrtg/bin/indexmaker --output=/var/apache/htdocs/mrtg/index.html --nolegend --enumerate --show=day /etc/mrtg/server.cfg
9. Konfigurasi start up
# cd /etc/rc.d/rc.lokal
#masukan kata berikut
###############################
#snmpd
/usr/snmpd/sbin/snmpd -c /usr/dotconf/snmpd.conf
#mrtg
rm -f /etc/mrtg/server.pid
/usr/mrtg/bin/mrtg /etc/mrtg/server.cfg
#env LANG=C /usr/mrtg/bin/mrtg /etc/mrtg/server.cfg <===tambahan bila ada kekurangan lib
10. Tambahkan di /etc/mrtg/server.cfg
RunAsDaemon: YES
Interval: 5
Refresh: 300
No comments:
Post a Comment