LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Where does yum install mrtg? (https://www.linuxquestions.org/questions/linux-general-1/where-does-yum-install-mrtg-543795/)

GavB 04-06-2007 07:17 AM

Where does yum install mrtg?
 
I have normally installed mrtg manually, but I suddenly realised that you can just use yum which saves a lot of time, just one thing, normally the path to mrtg has been /usr/local/mrtg-2/bin/mrtg but that doesnt seem to be the case after installing with yum.

It works ok if I run the following command:

env LANG=C mrtg /var/www/html/mrtg/core/mrtg.cfg

so I know it is installed ok, but when I put that into the crontab it doesn't run it so I assume I need the full path

(I would normally use this when installing manually:

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

with the full path)

If someone could point me in the right direction that would be great, thanks.

acid_kewpie 04-06-2007 08:40 AM

just ask rpm where it put stuff... "rpm -ql mrtg"

axelfc 04-09-2007 11:53 AM

First check here "/usr/bin/mrtg"

If by "manually" you mean you have compiled it from source the "rpm -ql mrtg" command won't show you anything. Instead try this
Code:

sudo updatedb
locate mrtg

I have a complete guide on How to install MRTG under Linux

acid_kewpie 04-09-2007 12:41 PM

what about...
Quote:

after installing with yum

axelfc 04-09-2007 01:45 PM

Sorry acid_kewpie. My mistake. :/

GavB 04-10-2007 08:58 AM

Thanks for your replies,

I got it working eventually using this:

*/5 * * * * root env LANG=C mrtg /var/www/html/mrtg/core/mrtg.cfg

not sure why that didn't work first time, but I've just set it up on another server and it's not working on that, so I'll just play around with it.

Also another strange thing happened, after a while, I got a permission denied error when going to http://my-ip-address/mrtg/ but then I changed the directory (and cron) to mrtg2 and it works. Whenever I create a directory called mrtg it still shows as permission denied - anyone got any idea of what could be happening? I have no .htaccess files that would deny access.

Thanks

axelfc 04-11-2007 05:11 AM

Check if in /etc/httpd/conf.d/mrtg.cfg you have set allow for 127.0.0.1 (localhost) as well as all the ips you want to have access to your mrtg pages.

Mine is like this
Code:

Alias /mrtg /var/www/mrtg
<Location /mrtg>
  Order deny,allow
  Deny from all
  Allow from 127.0.0.1 10.0.0.0/8
</Location>



All times are GMT -5. The time now is 12:50 PM.