More and more about NS-2

Installing NS-2 in Fedora 10

Download: ns-allinone-2.33

I have used VMWARE with Fedora 10 to install NS-2 for my convenience. The steps are as below:

Pre-installation NS-2:
1. Make sure FEDORA 10 is updated completely at the autoupdate.
2. Have the following install at TERMINAL. You must be the "root" to do this:
yum install autoconf
yum install automake
yum install gcc-c++
yum install libX11-devel
yum install xorg-x11-proto-devel
yum install libXt-devel
yum install libXmu-devel
yum install tk
yum install tcl
yum install make
yum install perl
yum install gnuplot


Installation for NS-2 in FEDORA 10:
1. Unzipped NS-2.33 file:
tar -xvzf ns-allinone-2.33.tar.gz
2. Go into ns-2.33 directory:
cd ns-allinone-2.33
3. Install ns-2.33
./install
4. Set environment:
gedit ~/.bashrc

Replace the following to your .bashrc file, double check your own installation path and version. Set the environment at "cd /home/username" as a user and not the "root":

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# User specific aliases and functions

# LD_LIBRARY_PATH
OTCL_LIB=/home/ellysoo/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/ellysoo/ns-allinone-2.33/lib
X11_LIB=/ellysoo/X11R6/lib
USR_LOCAL_LIB=/home/ellysoo/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB


# TCL_LIBRARY
TCL_LIB=/home/ellysoo/ns-allinone-2.33/tcl8.4.18/library
USR_LIB=/ellysoo/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/ellysoo/ns-allinone-2.33/bin:/home/ellysoo/ns-allinone-2.33/tcl8.4.18/unix:/home/ellysoo/ns-allinone-2.33/tk8.4.18/unix
NS=/home/ellysoo/ns-allinone-2.33/ns-2.33/
NAM=/home/ellysoo/ns-allinone-2.33/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM

5. If your environment is set properly, you should be able to run the command "ns" and get the result "%".

6. Validate your ns as followed:
./validate

0 comments:

Post a Comment