Installing MRTG

August 14th, 2008 by admin

Download the MRTG from http://people.ee.ethz.ch/~oetiker/webtools/mrtg/

extract the tarball

# tar zxvf mrtg-2.10.13.tar.gz

Enter to the directory

# cd mrtg-2.10.13

cofnigure it

# ./configure –prefix=/usr/local/mrtg –with-gd-lib=/usr/local/lib –with-gd-inc=/usr/local/include –with-png-lib=/usr/local/lib –with-png-inc=/usr/local/include

//*

** Ooops, one of many bad things happened:

a) You don’t have the GD library installed.

Get it from http://www.boutell.com, compile it and

use either –with-gd-lib=DIR and –with-gd-inc=DIR to specify

its location. You might also have to use –with-z-inc,

–with-z-lib and –with-png-inc, –with-png-lib for gd

versions 1.6 and higher. Check config.log for more

information on the problem.

b) You have the GD library installed, but not the gd.h

header file. Download the source (see above) and use

–with-gd-inc=DIR to specify where the file can be found.

c) You have the library and the header file installed, but

you also have a shared GD library in the same directory.

Remove the shared library files and/or links (e.g.

libgd.so.2.0.0, libgd.so and libgd.so.2). This is especially

likely if you’re using a recent (post 1.8.4) version of GD

and didn’t configure it with –disable-shared.

Consider following the instructions in doc/mrtg-unix-guide.txt

If you find above error, dont panci, enter /usr/local/lib and delete libgd.so,libgd.so.2.

*//

compile the source

# make

Install MRTG binary

# make install

enter /etc

# cd /etc
#mkdir mrtg

#cd /usr/local/apache/htdocs

# mkdir mrtg

run cfmaker to configure mrtg

#/usr/local/mrtg/bin/cfgmaker –global ‘WorkDir:/usr/local/apache/htdocs/mrtg’ –global ‘Options[_]: bits,growright’ –output /etc/mrtg/mrtg.cfg public@202.152.28.1 selanjutnya buat index nya dengan indexmaker

#/usr/local/mrtg/bin/indexmaker –output /usr/local/apache/htdocs/mrtg/index.html /etc/mrtg/mrtg.cfg

//*

Run MRTG

MRTG can be executed as a daemon or with crontab.

For the first option, set “RunAsDaemon= YES”.

for the second option, you could add this line on crontab (for example 5 minutes):

*//

#crontab -e

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

Now, execute mrtg.

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

Open your browser and go to http://server_name/mrtg/

Tags:

Installing GD

August 14th, 2008 by admin

continuing previous tutorial on how to install MRTG, now you have to install GD. you can download the GD from http://www.boutell.com/gd/

extract the tarball

# tar zxvf gd-2.0.33.tar.gz

change directory name

# mv gd-2.0.33 gd

enter the directory

# cd gd

now configure it out

# ./configure –disable-shared

compile the source

# make

install the binary

# make install

—————–

Now you could install the MRTG which i will write on next tutorial

Tags: