how can i install MRTG on CentOS

kris1351

Well-Known Member
Apr 18, 2003
963
0
166
Lewisville, Tx
Why not post in that thread where people are actively working on the installs. Getting MRTG running requires reading the docs and compiling/configuring it correctly unless you can find a package that is available like the one in the thread.
 

noimad1

Well-Known Member
Mar 27, 2003
626
0
166
zinehost said:
I am running centos 4 and I was able to install it with these exact instructions:

1: rpm -e mrtg
2: rpm http://www.interxstream.com/mrtg-2.9.17-1cpanel.i386.rpm -Uvh
3: cd /usr/lib
4: mv libpng.so.2 libpng.so.2.OLD
5: ln -s libpng.so.3 libpng.so.2
6: pico /etc/sysconfig/i18n
7: change LANG to LANG="en_US"
8: Start and stop MTRG several times ignoring errors ... service mrtg start/stop/restart
9: chkconfig --add mrtg
10. Add this line to httpd.conf at ver top: Alias /mrtg/ /usr/local/apache/htdocs/mrtg/
11. Restart httpd - httpd stop -> httpd startssl
11: Now check http://YourMainIP/mrtg/

Don't forget the trailing "/" on step 11....

Regards,
Damion
 

hadrick

Registered
Dec 15, 2005
4
0
151
Just run the following command and it will install mrtg automatically for you.

yum install mrtg

Regards
 

Adrnalnrsh

Well-Known Member
Apr 6, 2005
74
0
156
AZ
For some reason it seems that UPCP breaks MRTG every night. I installed this yesterday, everything was working until this morning, where I started getting a ton of errors. Which I didnt copy.

Then I tried to restart MRTG by doing a service mrtg restart, and it was unrecognized. I was able to start it by doing a /usr/bin/mrtg /etc/mrtg/mrtg.cfg start and then it still wasnt working, so what happened?

I do a chkconfig --list |grep mrtg and its not there anymore.

I try to do a chkconfig --add mrtg and I get an error.

chkconfig --add mrtg
error reading information on service mrtg: No such file or directory
 
Last edited:

bazzi

Well-Known Member
May 23, 2004
119
0
166
With witch install did you do it:

[recommended]yum install mrtg

or

1: rpm -e mrtg
2: rpm http://www.interxstream.com/mrtg-2.9...panel.i386.rpm -Uvh
3: cd /usr/lib
4: mv libpng.so.2 libpng.so.2.OLD
5: ln -s libpng.so.3 libpng.so.2
6: pico /etc/sysconfig/i18n
7: change LANG to LANG="en_US"
8: Start and stop MTRG several times ignoring errors ... service mrtg start/stop/restart
9: chkconfig --add mrtg
10. Add this line to httpd.conf at ver top: Alias /mrtg/ /usr/local/apache/htdocs/mrtg/
11. Restart httpd - httpd stop -> httpd startssl
11: Now check http://YourMainIP/mrtg/

If it is the last you can fix it by the following way:
pico /etc/yum.conf
find: exclude=httpd* mysql* php* perl* spamassassin* mod_ssl* kernel* courier* apache* exim*

add: libpng* png*


Good luck!
 

Adrnalnrsh

Well-Known Member
Apr 6, 2005
74
0
156
AZ
It was the last one, I will try this out. Thanks.
 

Adrnalnrsh

Well-Known Member
Apr 6, 2005
74
0
156
AZ
Well, I made the changes and MRTG has been destroyed again.

Here are a few things that start appearing in the console.

[/usr/local/apache/htdocs]# service mrtg stop
mrtg: unrecognized service
[/usr/local/apache/htdocs]# WARNING: Running '/etc/mrtg/system network eth0': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system network eth0'
Maybe the external command did not even start. (No such file or directory)

WARNING: Running '/etc/mrtg/system tcp': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system tcp'
Maybe the external command did not even start. (No such file or directory)

WARNING: Running '/etc/mrtg/system load': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system load'
Maybe the external command did not even start. (No such file or directory)

WARNING: Running '/etc/mrtg/system swap': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system swap'
Maybe the external command did not even start. (No such file or directory)

WARNING: Running '/etc/mrtg/system processes': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system processes'
Maybe the external command did not even start. (No such file or directory)

WARNING: Running '/etc/mrtg/system uptime': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system uptime'
Maybe the external command did not even start. (No such file or directory)

WARNING: Running '/etc/mrtg/email-totals1 MAIL-HOST': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/email-totals1 MAIL-HOST'
Maybe the external command did not even start. (No such file or directory)

WARNING: Running '/etc/mrtg/email-queue1 MAIL-HOST': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/email-queue1 MAIL-HOST'
Maybe the external command did not even start. (No such file or directory)

WARNING: Running '/etc/mrtg/email-count1 MAIL-HOST': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/email-count1 MAIL-HOST'
Maybe the external command did not even start. (No such file or directory)

WARNING: Running '/etc/mrtg/system network eth0': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system network eth0'
Maybe the external command did not even start. (No such file or directory)
 

bazzi

Well-Known Member
May 23, 2004
119
0
166
This is the script that mrtg.cfg uses.

Maybe just un install it and use, because the mrtg is very old:

yum install mrtg
 

Adrnalnrsh

Well-Known Member
Apr 6, 2005
74
0
156
AZ
I know about the mrtg.cfg file, the problem is upcp breaks it. Anyhow, I found something that may fix it.