The easiest way to install NS2 network simulator on Fedora 22 is to download an all-in-one package that contains all the tools needed for the simulator. The steps are as follows (tested on Fedora 22 x64):
1- Download the file ns-allinone-2.35.tar.gz from NS website at http://www.isi.edu/nsnam/ns/ns-build.html#allinone.
2- You need to move ns-allinone-2.35.tar.gz to your home directory and then unzip it as follows:
cd /home/mehdi
tar zxvf ns-allione-2.35.tar.gz
cd ns-allinone-2.35
3- Before we start building the package contents, we need to make sure the following tools are installed on Fedora:
libX11-devel
tcl
tk
gcc-c++
libXt-devel
Install the tools with this command:
yum install libX11-devel tcl tk gcc-c++ libXt-devel
4- Now, start the installation by typing ./install
It takes about 5 minutes to build and install components required by the network simulator.
5- Set the paths in the file (/home/mehdi/.bash_profile) as shown below (replace "mehdi" with your user name):
6- execute the .bash_profile using the command
source /home/mehdi/.bash_profile
7- check ns or nam by typing either ns or nam in the terminal
ns
% indicates ns interpreter is running
nam
Note:
a) In case you receive an error regarding the file ~/ns-2.35/linkstate/ls.h, change erase{ in ls.h to this->erase.
b) You must switch to root user in order to successfully install the package., and then you'll see the following screen showing that the installation has been successful.
Reference:
درباره این سایت