NS2 stands for network simulator and it is not in fedora repository but it's allinone package is available on isi.edu recently ns-2.35 RC7 is there with updated tcl and tk library but still it is not support gcc-4.5 series (does not like the X::X() construct) so i made 2 patches.
patch 2
Install Dependences :
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
Build ns-allinone-2.35
Go to you download directory and extract package (tar -xvf tarball), go to extracted directory and run
#./install
Validate ns-2.35
Go to ns-2.35 directory and run
#./validate (take almost 1 hour so keep patience)
Add PATH in .bashrc
vim ~/.bashrc
Add the following lines to the end of it. Remember replace “/opt/” by your installation path like “/home/username”. And accordingly also change the version numbers. This is for ns 2.35.
# LD_LIBRARY_PATH
OTCL_LIB=/opt/ns-allinone-2.35-RC7/otcl-1.14
NS2_LIB=/opt/ns-allinone-2.35-RC7/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/opt/ns-allinone-2.35-RC7/tcl8.5.8/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/opt/ns-allinone-2.35-RC7/bin:/opt/ns-allinone-2.35-RC7/tcl8.5.8/unix:/opt/ns-allinone-2.35-RC7/tk8.5.8/unix
NS=/opt/ns-allinone-2.35-RC7/ns-2.35/
NAM=/opt/ns-allinone-2.35-RC7/nam-1.15/
PATH=$PATH:$XGRAPH:$NS:$NAM
Logout/reboot your system and its done ... enjoy ... :)
Download links :
patch 1patch 2
After apply those patches you can follow below steps.
Install Dependences :
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
Build ns-allinone-2.35
Go to you download directory and extract package (tar -xvf tarball), go to extracted directory and run
#./install
Validate ns-2.35
Go to ns-2.35 directory and run
#./validate (take almost 1 hour so keep patience)
Add PATH in .bashrc
vim ~/.bashrc
Add the following lines to the end of it. Remember replace “/opt/” by your installation path like “/home/username”. And accordingly also change the version numbers. This is for ns 2.35.
# LD_LIBRARY_PATH
OTCL_LIB=/opt/ns-allinone-2.35-RC7/otcl-1.14
NS2_LIB=/opt/ns-allinone-2.35-RC7/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/opt/ns-allinone-2.35-RC7/tcl8.5.8/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/opt/ns-allinone-2.35-RC7/bin:/opt/ns-allinone-2.35-RC7/tcl8.5.8/unix:/opt/ns-allinone-2.35-RC7/tk8.5.8/unix
NS=/opt/ns-allinone-2.35-RC7/ns-2.35/
NAM=/opt/ns-allinone-2.35-RC7/nam-1.15/
PATH=$PATH:$XGRAPH:$NS:$NAM
Logout/reboot your system and its done ... enjoy ... :)


