Archive for the Linux Category

GNS3 on live cd

Posted in Cisco, Linux with tags , on June 21, 2008 by deadwait

IMPORTANT : the downloads are also available on http://www.gns3-labs.com  for a stable connection you can download the ISO and tar from there itself.  thanx a ton, lenny.

USB users having a problem with dynamips crashing — > change the working directory to somewhere on your USB , most probably your usb will be like this /mnt/sdb1 and so you can specify the working directory in your .net file like this  workingdir = /mnt/sdb1  .  thanx suhail and rajan for pointing out the issue.

Also would anyone like a live cd based on puppylinux, i think the entire cd should come around 140 mb with gns3 and 110 mb with only dynamips and dynagen.

 

OK, i finally got the gns3 slax live cd uploaded on 4shared, i have had to split the files in three , the total download comes to around 250 mb approx. you will need to use a program like 7-zip to extract the iso as well as the usb versions. to download the same headover to the newly createad downloads page on the right.

Advertisements

Dynagen Dynamips on Live CD or usb

Posted in Cisco, general, Linux with tags , , , , , , on June 18, 2008 by deadwait

moved to www.in2dwok.com

Cacti Doc in docs.cacti.net

Posted in Linux with tags , , , on October 3, 2007 by deadwait

Man, this is really cool, first of all my submissions of the cacti-xampp-ubuntu tutorial got accepted in howtoforge.com here http://www.howtoforge.com/cacti_xampp_ubuntu and best of all gandalf from cacti has asked to include it, in http://docs.cacti.net , ofcourse i said yes.

im happy today.

Update :Gandalf has put up the How-to at the foll. site http://docs.cacti.net/node/434 you can the see the details of the forum here

Cacti with Xampp on Ubuntu

Posted in Linux with tags , , on October 1, 2007 by deadwait

Cacti Setup Guide:

This is a simple setup of Cacti, so that you don’t really need a “linux” expert to maintain it. please note cacti can also be installed on windows and guides for both these installations are available on the net this guide is just a repeat of how cacti was setup here in mumbai.

what is Cacti? You can check out that here http://cacti.net

What is cacti being used for?

Cacti was primarily setup to monitor backhauls and have ready graphs whenever we need, but currently we are also using it to monitor cpu usage, memory usage, see traffic pattern’s, get alerts etc.

So now we go on to the basic setup,

Requirement:

One linux machine – ( can be any depending on your choice try and keep atleast 256mb ram , i have tested cacti on a 1.4ghz processor and 256 mb ram, with centos as the operating system and with around 350 monitored devices, and it has run without a hitch for more than a month, currently cacti resides on a 1.8ghz machine with 512 mb ram, which is also running a proxy server – squid, plus a intranet web ftp server )

the cacti package – we will need to download this from http://cacti.net

RRDtool – This is the defacto package used by 95% of all NMS tools out on the net for graphing, details can be found at http://oss.oetiker.ch/rrdtool/

Xampp – now the reason i am going in for Xampp is because it lets maintain a lot of things very easily, ( the apache webserver – mysql database , php programming language and all needed dependencies ) of course we can do it without xampp but you can search for those doc’s on the net.

Ubuntu installation :-

1: The First step now would be to install Linux on our machine, for this example we will download ubuntu ios from the following site http://cdimage.ubuntu.com/releases/gutsy/tribe-5/gutsy-desktop-i386.iso this is the current latest version of ubuntu.

note: there is a server version of ubuntu which is also available but we will not be going in for that due to lack of gui.

2: once downloaded burn it on to a cd and then boot the machine you have decided to make as your server with the same CD

3: once the machine boots up, you will notice that is running in live cd mode, i.e the hard disk is not being used, you will find a Install icon on the top left of your screen, double click on it and go ahead with the install, the only problem you might have is during partitioning as we are going in for a separate machine its best that we go in for auto partitioning ( a detailed ubuntu install guide is not really possible right now but it can found here https://help.ubuntu.com/6.10/ubuntu/installation-guide/i386/index.html.

Also remember to type in your username to be used as deadwait ( im taking deadwait just for this example )

4: Once ubuntu is installed – all further steps will now occur from within ubuntu itself, the next thing to do is see to it that it is updated, for that we have to have access to the internet hence you network card will have to configured, i hope you remember the root password you had supplied during the installation.

4.1 : click on

    system --> administration --> network

and in the wired connection tab supply your needed ip address/ subnet mask and gateway

4.2 :if your internet access is through a proxy then click on

   system --> preferences --> network proxy

and supply your proxy server’s ip address and port.

4.3 : open up a terminal window ( Applications –> accessories –> terminal ) and type in the foll. commands

     sudo aptitude update

and then

     sudo aptitude install build-essential

4.4 : Once the build essential is over you are set to install Xampp , RRDtool and Cacti

5: We will begin with Xampp – to know in detail what xampp is check out their website http://www.apachefriends.org/en/xampp.html , Now we need to download Xampp for linux directly clicking on this link http://jaist.dl.sourceforge.net/sourceforge/xampp/xampp-linux-1.6.3b.tar.gz . This is the current latest version of Xampp. remember to download it to /opt . ( the reason im going in for /opt is because the same is mentioned in the website, but remember you can have it downloaded and installed anywhere .)

5.1: Now assuming you have downloaded the file in /opt you need to do the foll next. ( im going to be guiding you in command line mode – but it can be done in GUI, the reason i haven’t mentioned the GUI method is because i get confused in GUI mode, as these DOCS will be open for editing later anyone who wishes to update the GUI mode can do so )

as usual click on

   Application --> accessories --> terminal

type in

   cd /opt

this will bring you in the /opt directory, type in

   sudo tar -xvzf xampp-linux-1.6.3b.tar.gz

what this does is unzip/unpack the file into its own directory, if you type int the command dir you will now see that a new directory (lampp) has been created, if you want to delete the xampp-linux-1.6.3b.tar.gz file or not is upto you, if you want to delete it the command is

   sudo rm -rf xampp-linux-1.6.3b.tar.gz

what i do is usually move these files in to my home folder, assuming my login name is tulip then my home folder becomes /tulip, the command to move the file is as follows

   sudo mv xampp-linux-1.6.3b.tar.gz /tulip

Now for the cool part –> int the same terminal type in

  cd lampp

then type in

  sudo ./lampp start

and your webserver along with mysql and ftp will have started, to check the same, open up firefox and type in http://localhost, you should get the Xampp screen.

5.2: Now lets clear some basic stuff we need to do – you see Cacti needs a database which we have already installed using xampp, now what we need to do is create cacti’s own database. now since you have opened up http://localhost in firefox, xampp will ask you its language preference, click on english, then on the left pane you will see a link for phpmyadmin, click on it, what you see now is an web based administration tool for MySql, on the first page itself you will see an option named Create Database in the field below type in cacti since this is the name we will use for our database ( ofcourse you could name it whatever you want ). then go on to the next step.

6: So then, one part of our work is done next thing to do is to install rrdtool. your going to love this, in a terminal box type in the magic commands

  sudo aptitude install rrdtool

and thats it rrdtool is installed ( Now for a bit of history, we can install entire cacti along with webserver php and mysql by doing sudo aptitude install cacti, but we havent done that because if you are not comfortable with linux it could lead to a lot of confusion as to where the files are installed, also the package could break if an upgrade takes place)

At the same time lets install one more tool needed which snmp with the same command

  sudo aptitude install snmp

and then

  sudo aptitude install snmpd

what is important to remember is rrdtool gets installed in /usr/bin/rrdtool, we will need this path later.

7: Now the cream – cacti installation.

first we need to download the cacti package which we can do so from this link http://www.cacti.net/downloads/cacti-0.8.6j.tar.gz

save the link on your eg: Desktop then open up a terminal and navigate to your deskto, the commands are (assuming your user login is tulip)

  cd /home/deadwait/Desktop

remember linux is case-sensitive so desktop wont work it will be Desktop, once we are in Desktop type in the foll commands

  sudo tar -xvzf cacti-0.8.6j.tar.gz

which will extract the foll in a directory named cacti-0.8.6j for purposes of our ease lets rename it to just cacti with the foll command

  sudo mv cacti-0.8.6j cacti

now that the directory is renamed lets move it in our lampp directory so that we can access it via our webserver, to do so run the foll command

  sudo mv cacti /opt/lampp/htdocs

now our cacti directory is copied on to lampp’s webroot directory, remember we had created a database in mysql named cacti, now we need to populate tis database, which you should not worry about if you dont understand, just follow the foll steps

7.2 :open up firefox and again go to phpmyadmin, http://localhost/phpmyadmin

on the left pane select the database which we have created, in our case its cacti.

then on the right pane select import –> then click on browse –> navigate to the directory /opt/lampp/htdocs/cacti in which you have to select the file cacti.sql and then click on go.

7.3: Again in a terminal type in

cd /opt/lampp/htdocs/cacti/include

then type in

sudo nano config.php

nano is an editor which will open up the file config.php, in the beginning you will see these options

 $database_type = "mysql";
 $database_default = "cacti";
 $database_hostname = "localhost";
 $database_username = "cactiuser";
 $database_password = "cactiuser";
 $database_port = "3306";

you need to change the username and password so that it looks like this

  $database_type = "mysql";
 $database_default = "cacti";
 $database_hostname = "localhost";
 $database_username = "root";
 $database_password = "";
 $database_port = "3306";

then press ctrl-x and come out.

7.4: Now open up firefox and type int the address bar the following http://localhost/cacti

you will be greeted with a screen which will be the beginning of the installation , just click on next

on the next screen you will asked if its a new install, which of course it is,confirm whether the database user and the database name mentioned are correct, go back to step 7.3 and check, click on next

7.5 : when we click it shows us the base paths of all needed files we will notice that the path for php is marked in red because the path is wrong the path shown in the installer is

  /usr/bin/php

we have to change that to

 /opt/lampp/bin/php

and then click finish.

Cacti is now installed.

It will open up to the cacti homepage and ask you a username and password type in

 admin

and password as

 admin

it will then force you to change the password , type in the new password that you decide on and log in using the new password.

We need to do a bit more stuff, you see cacti works by polling the devices which we set it up for, so lets set the poller for every 5 minutes, open up terminal and type in the foll command

 sudo nano /etc/crontab

this will open up the crontab file, now at the end type in the foll.

  • /5 * * * * deadwait /opt/lampp/bin/php /opt/lampp/htdocs/cacti/poller.php > /dev/null 2>&1

then press ctrl x and come out now all along we have assumed the username to login to your machine is tulip, hence the tulip is added above, now we need to do one last thing type in the following command in a terminal

 sudo chown -R 777 /opt/lampp/htdocs/cacti

thats its you are done!!! phew!