Installation of ns2 in Fedora

Installing ns2.34 in Fedora 8
  • Download ns-allinone-2.34.tar.gz from the following link

http://sourceforge.net/project/showfiles.php?group_id=149743&package_id=169689&release_id=684492

  • Execute the following commands to install ns2.34 from the terminal. You must login as root.

$cp ns-allinone-2.34.tar /opt/
$cd /opt/
$tar -xzf ns-allinone-2.34.tar.gz
$cd ns-allinone-2.34
$./install

  • After a long wait and a whole lot of text, you should see the installation finish up with text like the following:

Please put
/opt/ns-allinone-2.34/bin:/opt/ns-allinone-2.34/tcl8.4.18/unix:/opt/ns-allinone-2.34/ tk8.4.18/unix into your PATH environment;
so that you'll be able to run itm/tclsh/wish/xgraph.

IMPORTANT NOTICES:
  • You MUST put /opt/ns-allinone-2.34/otcl-1.13, /opt/ns-allinone-2.34/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 as: setenv LD_LIBRARY_PATH If you are using sh, you can set it as: export LD_LIBRARY_PATH=

  • You MUST put /opt/ns-allinone-2.34/tcl8.4.18/library into your TCL_LIBRARYenvironmental variable. Otherwise ns/nam will complain during startup.

    After these steps, you can now run the ns validation suite withscd ns-2.34; ./validate</li>
    </ul>
    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.

  • To change PATH environment & others, execute the following commands in terminal.

$cd /etc
$gedit ~/.bashrc &

  • Add following lines at the end of bashrc file.

# LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ns-allinone-2.34/otcl-1.13:/opt/ns-allinone-2.34/lib
# TCL_LIBRARY
export TCL_LIBRARY=$TCL_LIBRARY:/opt/ns-allinone-2.34/tcl8.4.18/library
# PATH
export PATH=$PATH:/opt/ns-allinone-2.34/bin:/opt/ns-allinone-2.34/tcl8.4.18/unix:/opt/ns-allinone-2.34/tk8.4.18/unix

  • To make the changes in the path & others permanent, type the following commands in terminal.

$ source ~/.bashrc
You can check what is written in your path by writing
$echo $PATH
$echo $LD_LIBRARY_PATH
$echo $TCL_LIBRARY

  • Now, the installation has been completed. If you try:

$ns
Then, a "%" will appear on the screen. Type the word "exit" to quit the mode.

  • You can test/validate the installation by doing the following: [Optional]
  • $cd /opt/ns-allinone-2.34/ns-2.34/
    $./validate

  • Note: Validation takes a long time to complete its process.