Wednesday, February 10, 2010

Installing NS2.33 in Ubuntu 9.10

Easiest way to install ns2 on ubuntu 9.10

Hi There!!!!!


Guys..... I wonder why people switch between Redhat an Fedora for doing their networking projects when they have UBUNTU. I am doing my final year project on adhoc networks and i was about to install fedora in my college for working. i was not comfortable with it and i couldnt get a copy of Fedora 8. So i tought of going for UBUNTU. I already have a been exposed to ubuntu and i was good. Now i got my self the new version 9.10 which has lot of cool features and it's working fine. What i found was But installing ns2 (The Network Simuator) through ns-allinone-2.3x package isn't easy on 9.10. While trying to install ns-allinone-2.3x, Firstly otcl doesn't compile with the latest gcc-4.4 (available with ubuntu 9.10). You need to compile it with gcc -4.3. If you get through this then also your problem is not solved, the ns-allinone-2.3x skips installing nam & xgraph as ubuntu 9.10 is not friendly with these packages available in ns-allinone-2.3x package.
So i spent lots of time to fix this problem and ended up with an interesting lauchpad ppa for installing ns2 on Ubuntu.

Since Ubuntu 9.10 is already being shipped with tcl,otcl,tk... you need not to install these packages, Only ns, nam & xgraph are needed to install.
If you are behind a proxy, make sure you have $http_proxy variable configured in ~/.bashrc.


Following are the simple steps to install ns2 on Ubuntu 9.10 through launchpad ppa.
1> Firstly remove all ns-allinone-2.3x directory (if you put it anywhere to install ns2) and revert back all the path changes you made in ~/.bashrc related to ns2.


2> Now export the Wouter Horré's ppa repository key by typing the following command on terminal and enter:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B3F3334F

3> Now add the following ppa repository to source list

To do so.....
Go to System menu--->Administration--->Software sources.

In the other softwares tab choose add+ and enter the following addresses in it.

deb http://ppa.launchpad.net/wouterh/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/wouterh/ppa/ubuntu karmic main
Reload repository information when prompted by "The information about available software is out-of-date" notification or reload it manually by following command on terminal:
sudo apt-get update
4> Now type the following command on terminal to install ns from the launchpad ppa repository:
sudo apt-get install ns nam xgraph
That's all. There is no need to set-up any path, environment variables or make any changes in ~/.bashrc .



Type ns to check:
you should see % at the command prompt (indicating successful installation)
Type exit if you get stuck with the %


This i ll do guys........

Now time for you to test some files.
So check out for the " ex " folder under your all-in-one-ns-2.33/ns-2.33/tcl/ex and try some simple tcl scripts.......


All the best for your success .....


With Regards VINOTH !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

1 comment:

Counter

blogger analytics