Pages

Thursday, June 3, 2010

NS2 allinone 2.34 install on Ubuntu 10.04

1. Download ns-allinone-2.34.tar.gz from isi.edu
2. tar -xzvf ns-allinone-2.34.tar.gz to unpack the saved archive
3. cd ns-allinone-2.34
4. sudo apt-get install build-essential autoconf automake libxmu-dev
5. sudo apt-get install g++-4.3
7. cd otcl-1.13
8. gedit Makefile.in → Replace CC= @CC@ with CC=gcc-4.3 → Save
9. cd .. → ns-allinone-2.34
10. ./install
11. gedit ~/.bashrc → Add the following lines to the end of the file and specify the folder wher ns-allinone-2.34 was unpacked as /your/path (eg. /home/dan):
# LD_LIBRARY_PATH
OTCL_LIB=/your/path/ns-allinone-2.34/otcl-1.13
NS2_LIB=/your/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=/your/path/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/your/path/ns-allinone-2.34/bin:/your/path/ns-allinone-
2.34/tcl8.4.18/unix:/your/path/ns-allinone-2.34/tk8.4.18/unix
NS=/your/path/ns-allinone-2.34/ns-2.34/
NAM=/your/path/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM

12.   source ~/.bashrc
13. ns → % exit
14. cd ns-2.34
15. ./validate

Installation complete.

0 comments:

Post a Comment