HOWTO: Install MRTG (FULLY AUTOMATED)

-bash-3.2# cd /usr/local/updatescript
-bash-3.2# ./update.script MRTG
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: centosf.centos.org
* updates: centosq.centos.org
* addons: centosf.centos.org
* extras: centosf.centos.org
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
Parsing package install arguments
Package gd-devel - 2.0.33-9.4.el5_1.1.i386 is already installed.
Nothing to do
Checking for previous MRTG installation...
There appears to be files in /var/www/html/mrtg already! Exiting...
 
-bash-3.2# cd /usr/local/updatescript
-bash-3.2# ./update.script MRTG
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: centosf.centos.org
* updates: centosq.centos.org
* addons: centosf.centos.org
* extras: centosf.centos.org
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
Parsing package install arguments
Package gd-devel - 2.0.33-9.4.el5_1.1.i386 is already installed.
Nothing to do
Checking for previous MRTG installation...
There appears to be files in /var/www/html/mrtg already! Exiting...

I thought I wrote it very explicit:

you MUST erase the mrtg/ directory and it's content and then let the update.script run again.

do:


rm -Rf /var/www/html/mrtg


Then run the update.script again.

-Alon.
 
hello.
i do it and first run:

rm -Rf /var/www/html/mrtg

and then :

cd /usr/local/updatescript
./update.script MRTG



-bash-3.2# cd /usr/local/updatescript
-bash-3.2# ./update.script MRTG
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: centosf.centos.org
* updates: centosq.centos.org
* addons: centosf.centos.org
* extras: centosf.centos.org
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
Parsing package install arguments
Package gd-devel - 2.0.33-9.4.el5_1.1.i386 is already installed.
Nothing to do
Checking for previous MRTG installation...
The directory /var/www/html/mrtg does not exist. I will create it...
Preparations complete...
Downloading the most recent MRTG and installing it...
--05:27:51-- http://oss.oetiker.ch/mrtg/pub/mrtg-2.16.2.tar.gz
Resolving oss.oetiker.ch... 213.144.138.195
Connecting to oss.oetiker.ch|213.144.138.195|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1078423 (1.0M) [application/x-tar]
Saving to: `mrtg-2.16.2.tar.gz'

100%[=======================================>] 1,078,423 765K/s in 1.4s

05:28:13 (765 KB/s) - `mrtg-2.16.2.tar.gz' saved [1078423/1078423]

checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for perl... /usr/bin/perl
checking for groff... /usr/bin/groff
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for inttypes.h... (cached) yes
checking for unsigned long long... yes
checking for long long... yes
checking for strtoll... yes
checking for printf long long format specifier... %lld
checking for pow in -lm... yes
checking for gdImageGif in -lgd... no
checking for gdImagePng in -lgd... yes
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... yes
checking gd.h presence... yes
checking for gd.h... yes
checking the weather... (cached) it's fine
checking if we can use GCC-specific compiler options... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: WARNING: Makefile.in seems to ignore the --datarootdir setting
config.status: creating config.h
ordering CD from http://tobi.oetiker.ch/wish .... just kidding ;-)

----------------------------------------------------------------
Config is DONE!

Type 'make' to compile the software

... that wishlist mentioned above does really exist. So if
you feel like showing your appreciation for MRTG, this is the
place to go. I just love CDs and DVDs

-- Tobi Oetiker <[email protected]>
----------------------------------------------------------------
gcc -I/usr/lib -DGFORM_GD=gdImagePng -g -O2 -Wall -Wpointer-arith -Wcast-align -Wmissing-declarations -Wnested-externs -Winline -W -DHAVE_CONFIG_H -c ./src/rateup.c -o bin/rateup.o
LD_RUN_PATH=/usr/lib gcc bin/rateup.o -o bin/rateup -L/usr/lib -lgd -lpng -lz -lm
/usr/bin/perl -0777 -p -i~ -e "s'^#!\s*/\S*perl'#! /usr/bin/perl'" ./bin/cfgmaker ./bin/indexmaker ./bin/mrtg
/usr/bin/perl -0777 -p -i~ -e 's@GRAPHFMT="...";@GRAPHFMT="png";@' ./bin/mrtg ./bin/indexmaker
/usr/bin/perl -0777 -p -i~ -e "s'^#!\s*/\S*perl'#! /usr/bin/perl'" ./bin/cfgmaker ./bin/indexmaker ./bin/mrtg
/usr/bin/perl -0777 -p -i~ -e 's@GRAPHFMT="...";@GRAPHFMT="png";@' ./bin/mrtg ./bin/indexmaker
/bin/sh ./mkinstalldirs /usr/local/mrtg-2/bin
mkdir /usr/local/mrtg-2
mkdir /usr/local/mrtg-2/bin
for x in ./bin/mrtg ./bin/cfgmaker ./bin/indexmaker ./bin/mrtg-traffic-sum; do \
/usr/bin/install -c -m 755 $x /usr/local/mrtg-2/bin; done
for x in bin/rateup; do \
/usr/bin/install -c -m 755 $x /usr/local/mrtg-2/bin; done
/bin/sh ./mkinstalldirs /usr/local/mrtg-2/lib/mrtg2/Pod
mkdir /usr/local/mrtg-2/lib
mkdir /usr/local/mrtg-2/lib/mrtg2
mkdir /usr/local/mrtg-2/lib/mrtg2/Pod
for x in ./lib/mrtg2/*.pm; do \
/usr/bin/install -c -m 644 $x /usr/local/mrtg-2/lib/mrtg2; done
for x in ./lib/mrtg2/Pod/*.pm; do \
/usr/bin/install -c -m 644 $x /usr/local/mrtg-2/lib/mrtg2/Pod; done
/bin/sh ./mkinstalldirs /usr/local/mrtg-2/share/mrtg2/icons
mkdir /usr/local/mrtg-2/share
mkdir /usr/local/mrtg-2/share/mrtg2
mkdir /usr/local/mrtg-2/share/mrtg2/icons
for x in ./images/*.gif ./images/*.png; do \
/usr/bin/install -c -m 644 $x /usr/local/mrtg-2/share/mrtg2/icons; done
/bin/sh ./mkinstalldirs /usr/local/mrtg-2/share/doc/mrtg2
mkdir /usr/local/mrtg-2/share/doc
mkdir /usr/local/mrtg-2/share/doc/mrtg2
(cd .; for x in COPYING COPYRIGHT README CHANGES THANKS doc/*.pod doc/*.txt doc/*.png; do \
/usr/bin/install -c -m 644 $x /usr/local/mrtg-2/share/doc/mrtg2; done)
/bin/sh ./mkinstalldirs /usr/local/mrtg-2/share/man/man1
mkdir /usr/local/mrtg-2/share/man
mkdir /usr/local/mrtg-2/share/man/man1
for x in ./doc/*.1; do \
/usr/bin/install -c -m 644 $x /usr/local/mrtg-2/share/man/man1; done
MRTG has been installed...
--05:32:42-- http://tools.web4host.net/core.tgz
Resolving tools.web4host.net... 67.205.112.100
Connecting to tools.web4host.net|67.205.112.100|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2175 (2.1K) [application/x-gzip]
Saving to: `core.tgz'

100%[==================================================================================================>] 2,175 1.19K/s in 1.8s

05:33:04 (1.19 KB/s) - `core.tgz' saved [2175/2175]

Creating necessary directories and preparing for installation...
Updating MRTG config and template...
./update.script: line 901: bc: command not found
Adding MRTG to /etc/crontab...
./update.script: line 910: [: missing `]'
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for network
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for network was invalid as well
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove network.old updating log file
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename network.log to network.old updating log file
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for tcp
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for tcp was invalid as well
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove tcp.old updating log file
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename tcp.log to tcp.old updating log file
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for load
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for load was invalid as well
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove load.old updating log file
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename load.log to load.old updating log file
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for disk
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for disk was invalid as well
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove disk.old updating log file
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename disk.log to disk.old updating log file
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for swap
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for swap was invalid as well
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove swap.old updating log file
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename swap.log to swap.old updating log file
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for processes
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for processes was invalid as well
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove processes.old updating log file
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename processes.log to processes.old updating log file
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for uptime
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for uptime was invalid as well
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove uptime.old updating log file
2009-02-07 05:33:53, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename uptime.log to uptime.old updating log file
2009-02-07 05:33:56, Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for cpu
2009-02-07 05:33:56, Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for cpu was invalid as well
2009-02-07 05:33:56, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove cpu.old updating log file
2009-02-07 05:33:56, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename cpu.log to cpu.old updating log file
2009-02-07 05:33:56, Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not read the primary log file for memory
2009-02-07 05:33:56, Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup log file for memory was invalid as well
2009-02-07 05:33:56, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove memory.old updating log file
2009-02-07 05:33:56, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't rename memory.log to memory.old updating log file
2009-02-07 05:34:33, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove network.old updating log file
2009-02-07 05:34:33, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove tcp.old updating log file
2009-02-07 05:34:33, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove load.old updating log file
2009-02-07 05:34:33, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove disk.old updating log file
2009-02-07 05:34:33, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove swap.old updating log file
2009-02-07 05:34:33, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove processes.old updating log file
2009-02-07 05:34:33, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove uptime.old updating log file
2009-02-07 05:34:33, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove cpu.old updating log file
2009-02-07 05:34:33, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove memory.old updating log file
Cleaning up installation...


MRTG install done

but not work.
 
The program you used to install is buggy. Install the bc command.
 
Is there anyway to install this so you don't lose historical data? I just did the install and it wiped my historical data out. I just would like to know for next time...

Thanks,
Phil
 
Anyone knows how to get rid of the big spikes that shows on Traffic when you restart the server??? those spikes makes everything flat!!! :mad:
 

Attachments

  • peaks.png
    peaks.png
    48.2 KB · Views: 316
HOW install mtrg on Debian 4.0?

When I install mrtg with update.script have

Code:
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 ...

PHPINFO:
Code:
gd
GD Support 	enabled
GD Version 	bundled (2.0.34 compatible)
FreeType Support 	enabled
FreeType Linkage 	with freetype
FreeType Version 	2.3.9
GIF Read Support 	enabled
GIF Create Support 	enabled
JPG Support 	enabled
PNG Support 	enabled
WBMP Support 	enabled
XBM Support 	enabled

Please, help me
 
Perhaps someone will respond and help you. Or you might try asking specific questions about specific issues. The real bottom line is that you have a choice of either learning from the beginning how to manage a server, or hire someone to manage it for you, or rent a server that comes with management.

Jeff
 
HOW install mtrg on Debian 4.0?

When I install mrtg with update.script have

Code:
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 ...

PHPINFO:
Code:
gd
GD Support 	enabled
GD Version 	bundled (2.0.34 compatible)
FreeType Support 	enabled
FreeType Linkage 	with freetype
FreeType Version 	2.3.9
GIF Read Support 	enabled
GIF Create Support 	enabled
JPG Support 	enabled
PNG Support 	enabled
WBMP Support 	enabled
XBM Support 	enabled

Please, help me

I have the same problem! :(
 
It means you don't have gdlib installed...

go to... http://www.libgd.org/releases/ download gd-2.0.35.tar.gz to Download directory... untar it tar -zxvf gd-2.0.35.tar.gz get into gd-2.0.35 directory cd gd-2.0.35, execute ./configure, then make and make install as sudo...

Hope that help...
 
Back
Top