Friday 3 September 2010

Installing NS 2 in Linux

Ns-2 installation


To install ns 2.27 in Red hat, there are following steps:
tar -xzf *
./install
change .bash_profile and add some environment variables. put /home/uday/ns-allinone-2.27/bin:/home/uday/ns-allinone-2.27/tcl8.4.5/unix:/home/uday/ns-allinone-2.27/tk8.4.5/unix into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.
IMPORTANT NOTICES:
(1) You MUST put /home/uday/ns-allinone-2.27/otcl-1.8, /home/uday/ns-allinone-2.27/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/uday/ns-allinone-2.27/tcl8.4.5/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.

(3) [OPTIONAL] To save disk space, you can now delete directories tcl8.4.5
and tk8.4.5. They are now installed under /home/uday/ns-allinone-2.27/{bin,include,lib}
so , finally the bash_profile is like this:
PATH=$PATH:$HOME/bin:/home/uday/ns2/ns-allinone-2.27/bin:/home/uday/ns2/ns-allinone-2.27/tcl8.4.5/unix:/home/uday/ns2/ns-allinone-2.27/tk8.4.5/unix

export LD_LIBRARY_PATH=/home/uday/ns2/ns-allinone-2.27/otcl-1.8:home/uday/ns2/ns-allinone-2.27/lib

export TCL_LIBRARY=/home/uday/ns2/ns-allinone-2.27/tcl8.4.5/library

cd ns-2.27; ./validate

same steps for other distro too..

No comments: