HOWTO: Install MRTG (FULLY AUTOMATED) 2.12.2

script not working with FreeBSD 6.0..
strange errors when compiling mrtg:

checking for gdImageGif in -lgd... no
checking for gdImagePng in -lgd... no
checking for gdImagePng_jpg in -lgd... no
checking for gdImagePng_jpg_ft in -lgd... no
checking for gdImageGd in -lgd... no
checking gd.h usability... no
checking gd.h presence... no
checking for gd.h... no

** 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.

d) You have gd library installed and also it's headers, but you are
missing libpng (and headers) or freetype (and headers)
(mrtg does not use freetype, but if your copy of gd is precompiled
against it, you have to install it ...

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

I have gd installed with DA installation...
 
anay said:
I second, where exactly I have to put .htaccess to make it passord protected

So how do I protect my Mrtg not intended people ??
 
Cheers - just installed with no problems.

Had to laugh at the the:

'Ordering CD from blah.....;) just kidding'

Humour in Linux, never thought that would happen :D

Ry
 
anay said:
So how do I protect my Mrtg not intended people ??

http://www.advancedhtml.co.uk/password.htm

What I've done is as follow:

cd /var/www/html
htpasswd -c .htpasswd mrtguser

then you will be prompted to enter the Password for the user mrtg .
(you can call it any name you like).

Then:

cd /var/www/html/mrtg
vi .htacess (or pico or nano)

Paste the following:

deny from all
allow from all
AuthUserFile /var/www/.htpasswd
AuthGroupFile /dev/null
AuthName PasswordDemo
AuthType Basic
<Limit GET>
require valid-user
</Limit>

Save the file and that's it!
 
i run to last step (centos 4.2)

[root@nagios html]# env LANG=C /usr/local/mrtg-2/bin/mrtg /var/www/html/mrtg/core/mrtg.cfg
Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for index
Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for index was invalid as well
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove index.old updating log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename index.log to index.old updating log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for tcp
Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for tcp was invalid as well
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove tcp.old updating log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename tcp.log to tcp.old updating log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for load
Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for load was invalid as well
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove load.old updating log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename load.log to load.old updating log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for swap
Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for swap was invalid as well
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove swap.old updating log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename swap.log to swap.old updating log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for processes
Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for processes was invalid as well
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove processes.old updating log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename processes.log to processes.old updating log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for uptime
Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for uptime was invalid as well
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove uptime.old updating log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename uptime.log to uptime.old updating log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for cpu
Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for cpu was invalid as well
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove cpu.old updating log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename cpu.log to cpu.old updating log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for memory
Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for memory was invalid as well
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove memory.old updating log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename memory.log to memory.old updating log file

is that norm?:confused:
 
neorder said:
i run to last step (centos 4.2)



is that norm?:confused:

all my installs had the same errors.
ignore them.
I think it just attempts to fix all logs (if there are any).
Since you are running it just after the install, it hasn't had the chance to create the logs files, so it runs on "emtpy" and yields the error msgs.
If you run this script after a day, it may not show any errors.
 
When downloading and working with this what should your working directory be?


Thanks,
Jim
 
has anyone installed the 95Percentile add-on?
The say it is a simple 3-4 steps to add it, yet I have no clue as to how.
There is a file patch and a file upload and I'm lost as to where to patch the file,.. and which file even to begin with.
 
i downloaded it outside the root folder,in / folder and run it there
 
yes,i did remove the .sh file i downloaded
 
Last edited:
Thanks @how@ for your contribution. Your script works great!
 
Upgrade MRTG to latest version!

Code:
wget http://people.ee.ethz.ch/~oetiker/webtools/mrtg/pub/mrtg.tar.gz
tar zxf mrtg.tar.gz
cd mrtg*
./configure --with-gd=/usr/local/lib
make
make install
cd ..
rm -rf mrtg*

Current: 2.14.3
 
Back
Top