This semester I got an assignment from Wireless/Mobile Computing lecture. It's all about NS2, the most popular network simulator. Today I tried to install it on my Ubuntu 8.04. And, here is the story :)
1. Download ns-allinone-2.33.tar from here.
2. Place it in somewhere, e.g. /home/programmer, then extract it.
3. Download & install some packages from repository :)
4. Install the ns2
5. Edit some paths ==a
Put these lines on that file. Off course, you might change /home/programmer for it depends on where you extract ns-allinone-2.33.tar.
6. Validate it
7. (Optionally) Create a symlink, so that ns can be called from everywhere
8. Try to run it (and pray :)
Cheers!
1. Download ns-allinone-2.33.tar from here.
2. Place it in somewhere, e.g. /home/programmer, then extract it.
$ cd /home/programmer
$ tar -xvf ns-allinone-2.33.tar
3. Download & install some packages from repository :)
$ sudo apt-get install build-essential autoconf automake libxmu-dev
4. Install the ns2
$ cd ns-allinone-2.33
$ ./install
5. Edit some paths ==a
$ gedit ~/.bashrc
Put these lines on that file. Off course, you might change /home/programmer for it depends on where you extract ns-allinone-2.33.tar.
# LD_LIBRARY_PATH
OTCL_LIB=/home/programmer/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/programmer/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/programmer/ns-allinone-2.33/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/programmer/ns-allinone-2.33/bin:/home/programmer/ns-allinone-2.33/tcl8.4.18/unix:/home/programmer/ns-allinone-2.33/tk8.4.18/unix
NS=/home/programmer/ns-allinone-2.33/ns-2.33/
NAM=/home/programmer/ns-allinone-2.33/nam-1.13/
export PATH=$PATH:$XGRAPH:$NS:$NAM
6. Validate it
$ cd ns-2.33
$ ./validate
7. (Optionally) Create a symlink, so that ns can be called from everywhere
$ sudo ln -s /home/programmer/ns-allinone-2.33/ns-2.33/ns /usr/bin/ns
8. Try to run it (and pray :)
$ ns
Cheers!