-
February 20th, 2010, 11:09
#1
عضو انجمن
آموزش نصب گراف mrtg به سادگی هرچه تمام تر :D
من یه چند وقتی دنبال نصب ی گراف روی mainserver خودم بودم که یه جا دیدم یه اسکریپت گذاشته برای نصب mrtg برای دایرکت ادمین گفتم بزارم اینجا همه استفاده کنن. البته من این رو روس سرور اصلی که vps ها روشنو بودن تست کردم و جواب داد
خوب برای استفاده از این اول اگر mrtg نصب دارین که مشکل داره باید پاک کنید و ورودی هایی هم توی crontab براش وارد کردین اونارو هم باید پاک کنید
خوب در مسیر زید فایل mrtg.cfg نصب میشه
برای استفاده میتونید از هاست نیم یا IP استفاد کنید
نحوه پاک کردن هم به صورت زیر
کد:
Open /etc/crontab and remove the line that reads:
*/5 * * * * root /usr/local/mrtg-2/bin/mrtg /var/www/html/mrtg/core/mrtg.cfg
rm -rf /usr/local/mrtg-2/
rm -rf /var/www/html/mrtg/
ممکنه مثل من به مشکل زیر بخورید
کد:
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 targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.
MRTG has been installed...
Updating MRTG config and template...
--10:37:13-- http://tools.supernamechange.com/mrtgcfg.tar.gz
=> `mrtgcfg.tar.gz'
Resolving tools.supernamechange.com... 72.55.156.182
Connecting to tools.supernamechange.com|72.55.156.182|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2,056 (2.0K) [application/x-gzip]
100%[=====================================================================================================================================>] 2,056 --.--K/s
10:37:13 (15.59 KB/s) - `mrtgcfg.tar.gz' saved [2056/2056]
Adding MRTG to /etc/crontab...
env: /usr/local/mrtg-2/bin/mrtg: No such file or directory
env: /usr/local/mrtg-2/bin/mrtg: No such file or directory
env: /usr/local/mrtg-2/bin/mrtg: No such file or directory
env: /usr/local/mrtg-2/bin/mrtg: No such file or directory
Cleaning up installation...
MRTG install done
I'm not in competition with anybody But myself .. , My goal is to beat my last Performance
-
تعداد تشکر ها ازiranwebwork به دلیل پست مفید
-
February 20th, 2010 11:09
# ADS
-
February 20th, 2010, 12:48
#2
عضو انجمن
پاسخ : آموزش نصب گراف mrtg به سادگی هرچه تمام تر :D
ممنون از آموزش خوبتون ، ولی مهم تر از نصب ، تنظیماتش هست که سرعت رو برای هر آی پی محدود کنه و میزان مصرفیشو نشون بده !
ویرایش توسط Roka : February 20th, 2010 در ساعت 12:50
-
-
February 20th, 2010, 14:16
#3
عضو انجمن
پاسخ : آموزش نصب گراف mrtg به سادگی هرچه تمام تر :D
حتما اون ها رو هم سرچي ميكنم راجع بهش.
فقط يك مورد ديگ كه ممكنه موقع اجراي دستور mrtg بر بخورين اينه
کد:
ERROR: Mrtg will most likely not work properly when the environment
variable LANG is set to UTF-8. Please run mrtg in an environment
where this is not the case. Try the following command to start:
env LANG=C /usr/bin/mrtg /var/www/html/mrtg/core/mrtg.cfg
حل اين مشكا هم ساده هست. به مسير زير برين
کد:
/var/www/html/mrtg/core
و دسنورات زير رو اجرا كنيد
کد:
bash# LANG=C
bash# mrtg mrtg.cfg
ممكنه بعد از اجراي دستور آخر اروري چيزي بده كه اگر داد شما 2 بار ديگر دستور رو اجرا كنيد تا اررور نده :دي
بعد سرويس mrtg شما استارت ميشه و تنظيمات رو از توي فايل كانفيگ توي مسير جاري ميخونه و لود ميشه
موفق باشيد
---------- Post added at 02:16 PM ---------- Previous post was at 01:56 PM ----------
اين هم ليست تنظيمات و پارامترهاي فايل mrtg.cfg
MRTG - Creates mrtg.cfg files (for mrtg-2.16.2)
I'm not in competition with anybody But myself .. , My goal is to beat my last Performance
-