How To Install Mrtg

www# chmod +x install.mrtg.sh
www# ./install.mrtg.sh
./install.mrtg.sh: Command not found.
 
billy2e said:
www# chmod +x install.mrtg.sh
www# ./install.mrtg.sh
./install.mrtg.sh: Command not found.

Code:
rm -rf /usr/local/mrtg-2/
rm -rf /var/www/html/mrtg/
wget [url]http://www.web4host.net/tools/install.mrtg.sh[/url]
chmod +x install.mrtg.sh
./install.mrtg.sh
 
www# rm -rf /usr/local/mrtg-2/
www# rm -rf /var/www/html/mrtg/
www# wget http://www.web4host.net/tools/install.mrtg.sh
--15:24:13-- http://www.web4host.net/tools/install.mrtg.sh
=> `install.mrtg.sh'
Resolving www.web4host.net... 72.232.91.74
Connecting to www.web4host.net|72.232.91.74|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2,078 (2.0K) [application/x-sh]

100%[====================================>] 2,078 --.--K/s

15:24:14 (29.14 MB/s) - `install.mrtg.sh' saved [2078/2078]

www# chmod +x install.mrtg.sh
www# ./install.mrtg.sh
./install.mrtg.sh: Command not found.
 
See first line of script

#!/bin/bash

freeBSD not install bash as default
try change it to use sh instread

#!/bin/sh
 
www# ./install.mrtg.sh
----------------------------------------


Released By Wael Isa (www.web4host.net)
----------------------------------------


Checking for previous MRTG installation...
The directory /var/www/html/mrtg does not exist. I will create it...
Creating necessary directories and preparing for installation...
cd: can't cd to /usr/local/src
Preparations complete...
Downloading the most recent MRTG and installing it...
--12:05:31-- http://people.ee.ethz.ch/~oetiker/webtools/mrtg/pub/mrtg-2.14.3.tar.gz
=> `mrtg-2.14.3.tar.gz'
Resolving people.ee.ethz.ch... 129.132.2.203
Connecting to people.ee.ethz.ch|129.132.2.203|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,099,840 (1.0M) [application/x-tar]

100%[=================================================================================>] 1,099,840 198.82K/s ETA 00:00

12:05:39 (164.48 KB/s) - `mrtg-2.14.3.tar.gz' saved [1099840/1099840]

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 ANSI C... 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 egrep... 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... 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
make: no target to make.
make: don't know how to make install. Stop
MRTG has been installed...
Updating MRTG config and template...
--12:05:49-- http://www.web4host.net/tools/mrtgcfg.tar.gz
=> `mrtgcfg.tar.gz'
Resolving www.web4host.net... 72.232.91.74
Connecting to www.web4host.net|72.232.91.74|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2,056 (2.0K) [application/x-gzip]

100%[=================================================================================>] 2,056 --.--K/s

12:05:50 (120.53 KB/s) - `mrtgcfg.tar.gz' saved [2056/2056]

Update complete!
Adding MRTG to /etc/crontab...
Executing MRTG for the first time (you may see some warnings)...
./install.mrtg.sh: /usr/local/mrtg-2/bin/mrtg: not found
If you see warnings above, it is generally safe to ignore.
Cleaning up installation...
----------------------------------------


Installation of MRTG complete!
----------------------------------------


Released By Wael Isa (www.web4host.net)
----------------------------------------


www# env LANG=C /usr/local/mrtg-2/bin/mrtg /var/www/html/mrtg/core/mrtg.cfg

he said env: /usr/local/mrtg-2/bin/mrtg: No such file or directory

what can i do??
 
billy2e said:
www# ./install.mrtg.sh
----------------------------------------
** 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
make: no target to make.
make: don't know how to make install. Stop
----------------------------------------


www# env LANG=C /usr/local/mrtg-2/bin/mrtg /var/www/html/mrtg/core/mrtg.cfg

he said env: /usr/local/mrtg-2/bin/mrtg: No such file or directory

what can i do??

This because mrtg fail to install but install sh still continue on the next step

I also got this error, still finding the way...
 
So did we ever come up with a good config file to use with FreeBSD 6.x? Using the ports collection mrtg and the mrtg.cfg given by this install only produces garbage. Garbage follows:

Starting mrtg_daemon.
Daemonizing MRTG ...
metis# cat: /proc/net/dev: No such file or directory
WARNING: Problem with External get '/var/www/html/mrtg/core/system network sis0':
Expected a Number for 'in' but got ''

WARNING: Problem with Externale get '/var/www/html/mrtg/core/system network sis0':
Expected a Number for 'out' but got ''

cat: /proc/loadavg: No such file or directory
cat: /proc/loadavg: No such file or directory
WARNING: Problem with External get '/var/www/html/mrtg/core/system load':
Expected a Number for 'in' but got ''

WARNING: Problem with Externale get '/var/www/html/mrtg/core/system load':
Expected a Number for 'out' but got ''

cat: /proc/meminfo: No such file or directory
cat: /proc/meminfo: No such file or directory
expr: syntax error
WARNING: Problem with External get '/var/www/html/mrtg/core/system swap':
Expected a Number for 'in' but got ''

WARNING: Problem with Externale get '/var/www/html/mrtg/core/system swap':
Expected a Number for 'out' but got ''

cat: /proc/loadavg: No such file or directory
cat: /proc/loadavg: No such file or directory
WARNING: Problem with External get '/var/www/html/mrtg/core/system processes':
Expected a Number for 'in' but got ''

WARNING: Problem with Externale get '/var/www/html/mrtg/core/system processes':
Expected a Number for 'out' but got ''

cat: /proc/uptime: No such file or directory
cat: /proc/uptime: No such file or directory
WARNING: Problem with External get '/var/www/html/mrtg/core/system uptime':
Expected a Number for 'in' but got ''

WARNING: Problem with Externale get '/var/www/html/mrtg/core/system uptime':
Expected a Number for 'out' but got ''

cannot open /proc/stat: No such file or directory
WARNING: Could not get any data from external command '/usr/bin/awk '/cpu /{print $2+$3; print $2+$3+$4; print "quite some time"; print "domain.com"}'</proc/stat'
Maybe the external command did not even start. ()

WARNING: Problem with External get '/usr/bin/awk '/cpu /{print $2+$3; print $2+$3+$4; print "quite some time"; print "domain.com"}'</proc/stat':
Expected a Number for 'in' but nothing'

WARNING: Problem with External get '/usr/bin/awk '/cpu /{print $2+$3; print $2+$3+$4; print "quite some time"; print "domain.com"}'</proc/stat':
Expected a Number for 'out' but nothing'

free: not found
free: not found
WARNING: Problem with External get '/var/www/html/mrtg/core/system memory':
Expected a Number for 'in' but got ''

WARNING: Problem with Externale get '/var/www/html/mrtg/core/system memory':
Expected a Number for 'out' but got ''

ERROR: Target[index][_IN_] ' $target->[0]{$mode} ' did not eval into defined data
ERROR: Target[index][_OUT_] ' $target->[0]{$mode} ' did not eval into defined data
/usr/local/bin/rateup: Permission denied
Rateup ERROR: Can't open index.tmp for write
ERROR: Skipping webupdates because rateup did not return anything sensible
WARNING: rateup died from Signal 0
with Exit Value 1 when doing router 'index'
Signal was 0, Returncode was 1
/usr/local/bin/rateup: Permission denied
Rateup ERROR: Can't open tcp.tmp for write
ERROR: Skipping webupdates because rateup did not return anything sensible
WARNING: rateup died from Signal 0
with Exit Value 1 when doing router 'tcp'
Signal was 0, Returncode was 1
ERROR: Target[load][_IN_] ' $target->[2]{$mode} ' did not eval into defined data
ERROR: Target[load][_OUT_] ' $target->[2]{$mode} ' did not eval into defined data
/usr/local/bin/rateup: Permission denied
Rateup ERROR: Can't open load.tmp for write
ERROR: Skipping webupdates because rateup did not return anything sensible
WARNING: rateup died from Signal 0
with Exit Value 1 when doing router 'load'
Signal was 0, Returncode was 1
ERROR: Target[swap][_IN_] ' $target->[3]{$mode} ' did not eval into defined data
ERROR: Target[swap][_OUT_] ' $target->[3]{$mode} ' did not eval into defined data
/usr/local/bin/rateup: Permission denied
Rateup ERROR: Can't open swap.tmp for write
ERROR: Skipping webupdates because rateup did not return anything sensible
WARNING: rateup died from Signal 0
with Exit Value 1 when doing router 'swap'
Signal was 0, Returncode was 1
ERROR: Target[processes][_IN_] ' $target->[4]{$mode} ' did not eval into defined data
ERROR: Target[processes][_OUT_] ' $target->[4]{$mode} ' did not eval into defined data
/usr/local/bin/rateup: Permission denied
Rateup ERROR: Can't open processes.tmp for write
ERROR: Skipping webupdates because rateup did not return anything sensible
WARNING: rateup died from Signal 0
with Exit Value 1 when doing router 'processes'
Signal was 0, Returncode was 1
ERROR: Target[uptime][_IN_] ' $target->[5]{$mode} ' did not eval into defined data
ERROR: Target[uptime][_OUT_] ' $target->[5]{$mode} ' did not eval into defined data
/usr/local/bin/rateup: Permission denied
Rateup ERROR: Can't open uptime.tmp for write
ERROR: Skipping webupdates because rateup did not return anything sensible
WARNING: rateup died from Signal 0
with Exit Value 1 when doing router 'uptime'
Signal was 0, Returncode was 1
ERROR: Target[cpu][_IN_] ' $target->[6]{$mode} ' did not eval into defined data
ERROR: Target[cpu][_OUT_] ' $target->[6]{$mode} ' did not eval into defined data
/usr/local/bin/rateup: Permission denied
Rateup ERROR: Can't open cpu.tmp for write
ERROR: Skipping webupdates because rateup did not return anything sensible
WARNING: rateup died from Signal 0
with Exit Value 1 when doing router 'cpu'
Signal was 0, Returncode was 1
ERROR: Target[memory][_IN_] ' $target->[7]{$mode} ' did not eval into defined data
ERROR: Target[memory][_OUT_] ' $target->[7]{$mode} ' did not eval into defined data
/usr/local/bin/rateup: Permission denied
Rateup ERROR: Can't open memory.tmp for write
ERROR: Skipping webupdates because rateup did not return anything sensible
WARNING: rateup died from Signal 0
with Exit Value 1 when doing router 'memory'
Signal was 0, Returncode was 1


BigWil
 
Back
Top