Search This Blog

Monday, February 22, 2010

For installing ns-2 on linux systems

========================================
# first put the tar.gz file in the folder say /home/abc

then

# use this command
# tar -zxvf ns-allinone-2.31.tar.gz
# cd ns-allinone-2.31
#./install

now to add this on startup do this.

cd /etc and type

gedit ~/.bashrc

Add the following lines to the end of it.

Replace “/usr/local/” by your installation path like mine was “/home/jigsaw”.

# LD_LIBRARY_PATH
OTCL_LIB=/usr/local/ns-allinone-2.31/otcl-1.12
NS2_LIB=/usr/local/ns-allinone-2.31/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=/usr/local/ns-allinone-2.31/tcl8.4.14/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/usr/local/ns-allinone-2.31/bin:/usr/local/ns-allinone-2.30/tcl8.4.13/unix:/usr/local/ns-allinone-2.31/tk8.4.13/unix
NS=/usr/local/ns-allinone-2.31/ns-2.31/
NAM=/usr/local/ns-allinone-2.31/nam-1.12/
PATH=$PATH:$XGRAPH:$NS:$NAM

then do

source ~/.bashrc




====================================