If it helps you

Friday, 18 March 2011

Install NS2


Installation of ns2.34 on UBUNTU version 10

Follow exactly the same order.

Open TERMINAL

copy these commands and paste in terminal ( use right click ).

" wget http://nchc.dl.sourceforge.net/sourceforge/nsnam/ns-allinone-2.34.tar.gz "
" tar -xzvf ns-allinone-2.34.tar.gz "
" cd ns-allinone-2.34 "
" sudo apt-get install build-essential autoconf automake libxmu-dev "

now open this file "Make.in". find this in your home directory (just open home directory there you can find  folder named as ns-allinone-2.34 and below is the complete file path).

"home/computer-name/ns-allinone-2.34/otcl-1.13/Makefile.in"

after opening this file. find a line that is

" CC=      @CC@ "

and change it to

" CC=      gcc-4.3"

save the file and return to TERMINAL

and write

" ./install "

after installation complete

write

" gedit ~/.bashrc "

a text file will open just scroll down and paste this and replace "path" by your computer name.
for example "ahmed".

for example : OTCL_LIB=/home/ahmed/ns-allinone-2.34/otcl-1.13

{


# LD_LIBRARY_PATH
OTCL_LIB=/home/path/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/path/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/home/path/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/path/ns-allinone-2.34/bin:/home/ateeb/ns-allinone-2.34/tcl8.4.18/unix:/home/path/ns-allinone-2.34/tk8.4.18/unix
NS=/home/path/ns-allinone-2.34/ns-2.34/
NAM=/home/path/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM



}

save the file and close it. just count your changes that should be equal to 7.

come back to TERMINAL and write

" source ~/.bashrc "

Finally installation is complete.
Now just check that it is running.

type this in TERMINAL

" ns "

% this sign will appear, it seems OK, now type " exit " in TERMINAL .

Now the main step to do. We have to validate NS-2.34 either it will not work.

write this in TERMINAL.

" cd ns-2.34 "
" ./validate "

it will take around 45 minutes in my case I use virtual-box with 1 Gb ram "
Now ENJOY.

No comments:

Post a Comment