MRTG install on Pi2 - How to?

My OSMC runs on a Pi2 and is on 24/7 so is an obvious candidate for installing MRTG to monitor Internet traffic on my router (BT Home Hub 4).

I have searched and found a few how-to pages for MRTG running on Debian but they all suggest installing apache2 with perl support. I believe pearl is already up and running as I already have Flexget running. Apache? I thought this was a WEB server. I use an Android remote that connects to OSMC on port 80 so isn’t some form of WEB server already up and running?

Q1 - Has anyone got MRTG up and running under OSMC?

Q2 - Can anyone point me to an appropriate How-To for OSMC/Pi2?

The Webserver that you use to control Kodi is build in and can not be used for external tools.
So you would need Apache (or another Webserver). But if you install a Webserver watch out that you either change the port of the internal Kodi Webserver or the one you install.
Your Debian how to should quite well work on OSMC.
Actually you can check [TESTING] LAMP stack on OSMC for a full LAMP install

Thank you. I will have a go with the LAMP install. It appears to be a nearly finished project as it does not yet show up in the App Store. As I only need the Apache side of it, this may well do all I need for MRTG.

LAMP install was easy. Only one minor error that I posted on the thread for information.
PERL - updated. Took over 20 minutes!
MRTG downloaded and followed the instructions HERE.

MRTG needs to be compiled and after following the instructions I ran ./configure --prefix=/usr/local/mrtg-2 but this returned an error “checking whether the C compiler works… no”.

I have NEVER compiled under Linux. I would like to continue posting my findings in an appropriate forum/thread but this site does not seem to have an appropriate section. Suggestions anyone?

I gather that I am having problems due to MRTG stopping development in 2012 but gcc has changed since then.

Just in case anyone here can help.
Looking at the compile log it appears that the script tested to see if a suitable compiler was installed by running gcc -V. Unfortunately, the installed gcc does not respond to -V but will respond to -v (case sensitive). I modified the script replacing every -V with -v.

Now I get “gcc: error: unrecognized command line option ‘-qversion’”. This one has me stumped.

Why didn’t you just tried to install it with apt-get?
http://www.malpass.org.uk/wordpress/?p=2561

LOL!

Do you ever want to crawl under a stone and hide? WHY on earth did I nor try that? I think I just expected it to be too obscure for apt-get.

Worked without errors. Now all I have to do is find out how to configure it as it must be at least 20 years since I last used it.

Thank you fzinken

My next “Why” question, why are you not use Cacti to do that job for you?
http://n00blab.com/cacti-pi/