Installing MRTG on uBuntu

apt-get install mrtg snmpd snmp

Edit the mrtg configuration file to edit some of the settings
File is located at /etc/mrtg.cfg you need to change the global settings as follows :
 

# Global Configuration

RunAsDaemon: yes
EnableIPv6: no
WorkDir: /var/www/mrtg
Options[_]: bits,growright
WriteExpires: Yes

Title[^]: Traffic Analysis for

Edit the snmp community name in snmp configration file /etc/snmp/snmpd.conf

# sec.name source community
# com2sec paranoid default public
com2sec readonly default public
#com2sec readwrite default private

Now you need to restart the snmp service
 

#/etc/init.d/snmpd restrat

Creating the configuration file using
 

#cfgmaker public@localhost > /etc/mrtg.cfg

Creating a configuration file for a device using
 

#cfgmaker public@192.168.0.1 >> /etc/mrtg.cfg

Create index file for the webserver
 

#indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

 

Installing Apache2, MySql, and phpMyAdmin in uBuntu

sudo apt-get install mysql-server
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install php5-mysql
sudo apt-get install phpmyadmin

To set up under Apache all you need to do is include the following line in /etc/apache2/apache2.conf, first type the following command to open up this file:
gksudo gedit /etc/apache2/apache2.conf

Add the following line of code inside apache2.conf:
Include /etc/phpmyadmin/apache.conf

Now restart Apache:
sudo /etc/init.d/apache2 restart