Monday, March 23, 2015

How to install ns2 on fedora 14

How to Install ns2 in fadora 14

Another Method


This tutorial has been tested on Ns-2 version 2.30, 2.31 and 2.32 and on Fedora 6, 7 and 8 (both 32 and 64bit).


Pre step: Fedora intallation & configuration

For a tutorial on how to install Fedora click here.
For some tips and tricks click here, but this page isn't updated for Fedora 6 so you could check this too.

1 step: package dependencies

Open a bash shell (click here to watch how) and type at prompt:
su
yum install gcc-c++
yum install libX11-devel
yum install xorg-x11-proto-devel
yum install libXt-devel
and for nam installation (optional):
yum install libXmu-devel

2 step: tcl installation

Open the bash shell and type at prompt:
su
cd
wget http://prdownloads.sourceforge.net/tcl/tcl8.4.14-src.tar.gz
cd /usr/share/
tar -zxvf /root/tcl8.4.14-src.tar.gz
cd /usr/share/tcl8.4.14/unix/
./configure
make
make install
rm -f /root/tcl8.4.14-src.tar.gz

3 step: tk installation

Open the bash shell and type at prompt:
su
cd
wget http://prdownloads.sourceforge.net/tcl/tk8.4.14-src.tar.gz
cd /usr/share/
tar -zxvf /root/tk8.4.14-src.tar.gz
cd /usr/share/tk8.4.14/unix/
./configure
make
make install
rm -f /root/tk8.4.14-src.tar.gz

4 step: otcl installation

Open the bash shell and type at prompt:
su
cd
wget http://downloads.sourceforge.net/otcl-tclcl/otcl-src-1.12.tar.gz
cd /usr/share
tar -zxvf /root/otcl-src-1.12.tar.gz
cd /usr/share/otcl-1.12/
./configure --with-tcl=/usr/share/tcl8.4.14/
make
kwrite Makefile
you should see the krite application window (click here to watxh); then find the line 31 or near
INST_OLIBSH= NONE/lib
and modify as
INST_OLIBSH= /usr/local/lib
then save the file, close kwrite anf finish the installation typing at prompt:
make install
rm -f /root/otcl-src-1.12.tar.gz

5 step: tclcl installation

Open the bash shell and type at prompt:
su
cd
wget http://downloads.sourceforge.net/otcl-tclcl/tclcl-src-1.18.tar.gz
cd /usr/share
tar -zxvf /root/tclcl-src-1.18.tar.gz
cd /usr/share/tclcl-1.18/
./configure --with-tcl=/usr/share/tcl8.4.14/
make
make install
rm -f /root/tclcl-src-1.18.tar.gz

6 step: ns2 installation

Open the bash shell and type at prompt:
su
cd
wget http://downloads.sourceforge.net/nsnam/ns-src-2.30.tar.gz
cd /usr/share
tar -zxvf /root/ns-src-2.30.tar.gz
cd /usr/share/ns-2.30/
./configure (or ./configure --enable-debug if you want to use gdb for debugging)
make
make install
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:' > /etc/profile.d/ns.sh
chmod 0733 /etc/profile.d/ns.sh
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:' > $HOME/.bashrc
rm -f /root/ns-src-2.30.tar.gz
To check if ns2 is well installed, type at promp (after a reeboot):
ns
you should see the '%' simbol, and if you type at the prompt:
% set ns [new Simulator]
you should see something like '_ox' or '_oxx', where x and xx are numbers (click here to watch). To return at promtp, type control and c keys togheter.

7 step: nam installation (optional)

Open the bash shell and type at prompt:
su
cd
wget http://downloads.sourceforge.net/nsnam/nam-src-1.12.tar.gz
cd /usr/share
tar -zxvf /root/nam-src-1.12.tar.gz
cd /usr/share/nam-1.12/
./configure
make
make install
rm -f /root/nam-src-1.12.tar.gz
To check if nam is well installed, type at promp:
nam
you should see the nam window (click here to watch)
otherwise, if you read this message:
'nam: no display name and no $DISPLAY environment variable'
it means that you're tring to launch nam out of a X11 graphical session.

8 step: xgraph installation (optional)

Open the bash shell and type at prompt:
su
cd
wget http://downloads.sourceforge.net/nsnam/xgraph-12.1.tar.gz
cd /usr/share
tar -zxvf /root/xgraph-12.1.tar.gz
cd /usr/share/xgraph-12.1/
./configure
make
make install
rm -f /root/xgraph-12.1.tar.gz
To check if xgraph is well installed, type at promp:
cd
wget http://wpage.unina.it/marcello.caleffi/file/xgraph.in
xgraph xgraph.in
you should see the xgraph window (click here to watch)
otherwise, if you read this message:
xgraph: cannot open display `'
it means that you're tring to launch xgraph out of a X11 graphical session.

No comments:

Post a Comment