Friday, August 20, 2010

NS2 for fedora 12 ,fedora 13 and RHEL5

hi guys
the indian it diary team has tested Installing different versions of ns2 in fedora 12,13 and also on RHEL5. after two weeks of continuous struggle to install , the team has found out this was the easiest and simplest procedure to install NS2 in Fedora 12 and 13 and also on RHEL5. now follow these steps.


Now follow these steps to install ns on Linux
Download ns-allinone package from nsnam sourceforge project page. Or
download directly version 2.34 from here.

After downloading extract the packages. To do this open gnome-terminal; press Alt + F2 and type exactly gnome-terminal there and hit enter. Then apply following commands.

$ tar xzvf ns-allinone-2.34.tar.gz

Now change directory and run ns `install` script applying following commands


$ cd ns-allinone-2.34

$ ./install



It will display a lot of information on the screen configuring, building and installing packages one after one. It might take around 10 minutes depending on your Computer’s speed. After installation is complete the screen will display information about installation paths of different packages.

Ns-allinone package has been installed successfully.

Here are the installation places:

tcl8.4.18: /home/aliyarappa/Desktop/ns-allinone-2.34/{bin,include,lib}

tk8.4.18: /home/aliyarappa/Desktop/ns-allinone-2.34/{bin,include,lib}

otcl: /home/aliyarappa/Desktop/ns-allinone-2.34/otcl-1.13

tclcl: /home/aliyarappa/Desktop/ns-allinone-2.34/tclcl-1.19

ns: /home/aliyarappa/Desktop/ns-allinone-2.34/ns-2.34/ns

nam: /home/aliyarappa/Desktop/ns-allinone-2.34/nam-1.14/nam

gt-itm: /home/aliyarappa/Desktop/ns-allinone-2.34/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns

----------------------------------------------------------------------------------



Please put /home/aliyarappa/Desktop/ns-allinone-2.34/bin:

/home/aliyarappa/Desktop/ns-allinone-2.34/tcl8.4.18/unix:

/home/aliyarappa/Desktop/ns-allinone-2.34/tk8.4.18/unix

into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.

IMPORTANT NOTICES:

(1) You MUST put /home/aliyarappa/Desktop/ns-allinone-2.34/otcl-1.13, /home/aliyarappa/Desktop/ns-allinone-2.34/lib,

into your LD_LIBRARY_PATH environment variable.

If it complains about X libraries, add path to your X libraries

into LD_LIBRARY_PATH.

If you are using csh, you can set it like:

setenv LD_LIBRARY_PATH

If you are using sh, you can set it like:

export LD_LIBRARY_PATH=

(2) You MUST put /home/aliyarappa/Desktop/ns-allinone-2.34/tcl8.4.18/library into your TCL_LIBRARY environmental

variable. Otherwise ns/nam will complain during startup.

After these steps, you can now run the ns validation suite with

cd ns-2.34; ./validate

For trouble shooting, please first read ns problems page

http://www.isi.edu/nsnam/ns/ns-problems.html. Also search the ns mailing list archive

for related posts.

This information is necessary because, you need to include them on your PATH variable.

To set your PATH correctly follow this format



where PATH_SUGGESTED_BY_INSTALLED_NS has to be replaced with the path displayed at the end of installation of NS.

$ PATH=$PATH:PATH_SUGGESTED_BY_INSTALLED_NS



For example in my case it is:


PATH=$PATH:/home/aliyarappa/Desktop

/ns-allinone-2.34/bin:home/aliyarappa/Desktop/

ns-allinone-2.34/tcl8.4.18/unix:/home/aliyarappa

/Desktop/ns-allinone-2.34/tk8.4.18/unix


To make it permanent append following line to .bashrc file (you can open this file using this command: `gedit ~/.bashrc &`)

export PATH=$PATH:PATH_SUGGESTED_BY_INSTALLED_NS

In my case it is:

export PATH=$PATH:/home/aliyarappa/Desktop

/ns-allinone-2.34/bin:home/aliyarappa/Desktop/

ns-allinone-2.34/tcl8.4.18/unix:/home/aliyarappa

/Desktop/ns-allinone-2.34/tk8.4.18/unix



After PATH is set correctly you can now work with NS. Simply type ns on terminal to run the simulator.

$ ./ns



% set a 4



4



% puts $a



4




% exit

0 comments: