8/24/2010

NS2 Installation Guide in Linux (Fedora)

A.Install need Packages:
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

B.Install NS2 in Fedora Tutorial
1) Go to link:SourceForge.net: Files

2) Download File: ns-allinone-2.29.tar.gz

3) Start Fedora and open Root Account

4) Place the downloaded file on Desktop and right click on it and select extract

5) Open Konsole and write following commands:

a)cd Desktop
b)cd ns-allinone-2.29
c)./INSTALL or ./install

C.edit ~/.bashrc
Now go to /etc folder and type
vim ~/.bashrc
Add the following lines to the end of it. Remember replace “/usr/local/” by your installation path like “/home/kazim”. And accordingly also change the version numbers. This is for ns 2.29.
# LD_LIBRARY_PATH
OTCL_LIB=/usr/local/ns-allinone-2.29/otcl-1.12
NS2_LIB=/usr/local/ns-allinone-2.29/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/usr/local/ns-allinone-2.29/tcl8.4.14/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/usr/local/ns-allinone-2.29/bin:/usr/local/ns-allinone-2.29/tcl8.4.13/unix:/usr/local/ns-allinone-2.29/tk8.4.13/unix
NS=/usr/local/ns-allinone-2.29/ns-2.29/
NAM=/usr/local/ns-allinone-2.29/nam-1.12/
PATH=$PATH:$XGRAPH:$NS:$NAM
Let it take effect immediately
source ~/.bashrc

##End.##

No comments:

Post a Comment