Home > Software, tutorial, ubuntu > ns2 installation in ubuntu

ns2 installation in ubuntu


This is an example of the NS2-AllInOne-2.33 installation for Ubuntu 8.10.

Download the most recent Ns-2-AllinOne-2.33 from Sourceforge.

Suppose that there is “ns-allinone-2.33.tar.gz” in current directory (e.g. “~/” for me is “/home/mm”).
All steps are done in Terminal, so open a terminal in Accessories/Terminal.

To extract the file:
tar xvfz ./ns-allinone-2.33.tar.gz

Go into extracted directory:
cd ns-allinone-2.33

Download required packages:
sudo apt-get install build-essential autoconf automake libxmu-dev

Start installation:
./install

Set environment parameter:
gedit ~/.bashrc
Then at the last line, append the following text with changing “/your/path” to the directory that contains “ns-allinone-2.33”. (e.g. “/home/mm/” )

# LD_LIBRARY_PATH
OTCL_LIB=/home/mm/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/mm/ns-allinone-2.33/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/mm/ns-allinone-2.33/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/mm/ns-allinone-2.33/bin:/home/mm/ns-allinone-2.33/tcl8.4.18/unix:/home/mm/ns-allinone-2.33/tk8.4.18/unix
NS=/home/mm/ns-allinone-2.33/ns-2.33/
NAM=/home/mm/ns-allinone-2.33/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: