How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

March 31, 2008

Install MRTG on RH9 in 10 Easy Steps

Filed under: Linux — admin @ 2:15 pm

This Howto work on a cpanel machine. Was tested on Rh9, FC2, FC1

1: rpm -e mrtg
2: rpm http://download.cheetaweb.com/mrtg-2.9.17-1cpanel.i386.rpm -Uvh
3: cd /usr/lib

4: mv libpng.so.2 libpng.so.2.OLD … OR rm libpng.so.2 (your choice)
5: ln -s libpng.so.3 libpng.so.2
6: pico /etc/sysconfig/i18n
7: change LANG to LANG=”en_US”
8: Start and stop MTRG several times ignoring errors … service mrtg start/stop/restart
9: chkconfig –add mrtg
10: Now check http://YourMainIP/mrtg/

NOTE: You May See the following error three times on startup of mrtg …
ls: /var/spool/exim/input/*-H: No such file or directory

This is normal … don’t worry about it.

Thanks to gpan from the RackShack forums for this RPM!

This how to was orginaly posted ad:http://forums.cpanel.net/showthread.php?t=19919&highlight=mrtg

=======================

Because the link to cpanel rpm is broken I uploaded this rpm on my account.
So you must replace :
rpm http://download.cheetaweb.com/mrtg-2.9.17-1cpanel.i386.rpm -Uvh
with:
rpm http://matrafox.info/mrtg-2.9.17-1cpanel.i386.rpm -Uvh

Personally, after I make this install I modify this file with that:
/etc/mrtg/check-email
#QUE=`ls /var/spool/exim/input/*-H | wc -l | sed -e “s/ //g”`
QUE=0
#DAYDEL=`/bin/grep -c ” [=-]> ” $LOGFILE`
DAYDEL=0
#DAYREC=`/bin/grep -c ”
DAYREC=0

also in /etc/mrtg/system I modify swap sequence
INDATA=`free -m | grep “Swap:” | sed ‘s/ * / /g’ | cut -d ‘ ‘ -f4`
OUTDATA=`free -m | grep “Swap:” | sed ‘s/ * / /g’ | cut -d ‘ ‘ -f3`

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress