Installation of ns-2 on Ubuntu 8.10
I write this short instructions to install the ns-2 network simulator under a fresh installation of Ubuntu 8.10 (Intrepid Ibex). Of course, it will work also in a non-fresh installation, and might help you to install in older versions of Ubuntu too. Here we go:
- Go into System > Administration > Synaptic Package Manager
- Install the following packages (and the dependent ones that are suggested by Synaptic):
- Download ns-allinone-2.33.tar.gz from the official page.
- Unpack it in your Home Directory
- Go into Applications > Accessories > Terminal
- Write:
- Now just wait while it's working. Don't worry about all the warnings, it's ok.
- When it's completed, if everything was ok you will see something like this:
- Now, go into Places > Home Folder, and the file browser will appear.
- Inside the file browser, go into File > View and enable "Show Hidden Files".
- Then edit the file .bashrc that is in your Home Folder and, at the end of that file, just add the following 3 lines (they are 3 lines starting with export, your web browser probably shows more) and save it (you must replace octubre with your ubuntu username, it's very important!):
- Now, go back to the Terminal, and write the following:
libxt-dev
libxmu-dev
g++
cd ns-allinone-2.33/
./install
------------------------------------------------------------ ----------------------
Please put /home/octubre/ns-allinone-2.33/bin:/home/octubre/ns- allinone-2.33/tcl8.4.18/unix:/ home/octubre/ns-allinone-2.33/ tk8.4.18/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.
IMPORTANT NOTICES:
(1) You MUST put /home/octubre/ns-allinone-2.33/otcl-1.13, /home/octubre/ns-allinone-2. 33/lib,
into your LD_LIBRARY_PATH environment variable.
If it complains about X libraries, add path to your X libraries
into LD_LIBRARY_PATH.
If you are using csh, you can set it like:
setenv LD_LIBRARY_PATH
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=
(2) You MUST put /home/octubre/ns-allinone-2.33/tcl8.4.18/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.
After these steps, you can now run the ns validation suite with
cd ns-2.33; ./validate
For trouble shooting, please first read ns problems page
http://www.isi.edu/nsnam/ns/ns-problems.html . Also search the ns mailing list archive
for related posts.
export PATH=/home/octubre/ns-allinone-2.33/bin:/home/octubre/ns-allinone-2.33/tcl8.4.18/unix:/home/octubre/ns-allinone-2.33/tk8.4.18/unix:"${PATH}"
export LD_LIBRARY_PATH=/home/octubre/ns-allinone-2.33/otcl-1.13:/home/octubre/ns-allinone-2.33/lib
export TCL_LIBRARY=/home/octubre/ns-allinone-2.33/tcl8.4.18/library
source ~/.bashrc
So... if everything was ok now you should be able to run ns-2 without problems. Just write
namin a terminal window and enjoy!





1 comentarios:
Excellent! This tutorial is super practical. Helped me a lot!
Thanks.
Publicar un comentario en la entrada