Pages

Wednesday 29 February 2012

Ns2-installation process in fedora-16

Step:1    open terminal as admin.
               # su
               It will ask password.        
Pre-Installation: Before NS2 installation some packages must be        installed. Required packages are:
                yum install gcc tcl-devel libX11-devel libXt-devel autoconf automake libXmu-devel

Step : 2 Uncompress the ns2 use GUI or Terminal
> tar zxvf ns-allinone-2.34.tar.gz

> cd /home/username/Desktop/ns-allinone-2.34
> ./install (execute the script)
> If the installation fails in the middle, then try to install the linux packages that are missing
> Once the installation succeeded, then a set of path information will be provided by the NS2
> Set the path in the /root/.bash_profile
(vi /root/.bash_profile)
or
If you are a user home//.bash_profile
vi /home/username/.bash_profile
# User specific aliases and functions
# LD_LIBRARY_PATH
OTCL_LIB=/home/username/Desktop/Study/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/username/Desktop/Study/ns-allinone-2.34/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB
# TCL_LIBRARY
TCL_LIB=/home/username/Desktop/Study/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib

Step : 3 export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/username/Desktop/Study/ns-allinone-2.34/bin:/home/username/Desktop/Study/ns-allinone-2.34/tcl8.4.18/unix:/home/username/Desktop/Study/ns-allinone-2.34/tk8.4.14/unix
NS=/home/username/Desktop/Study/ns-allinone-2.34/ns-2.34/
NAM=/home/username/Desktop/Study/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM

Step 4 :> go to the terminal and try ns or nam
> for running the examples comes along with the distribution of NS2
cd ns-allinone-2.34/ns-2.34/tcl/ex

Step 5 :After these steps, you can now run the ns validation suite with
cd ns-2.34; ./validate

1 comment: