PROCEDURE 1:
The nightmare days are over!
Now you dont have to spend hours on your linux distro(ubuntu) installing and validating ns2.x
Ubuntu 10.10 has greatly simplified things. You can now install ns,nam and xgraph by just a single command in the Terminal:
You will be prompted for the user password. Enter it and watch Ubuntu 10.10 do the things for You!
Happy Ubuntuing .
Step1: Download ns-allinone-2.34 package from this <site>. I will be using ns version 2.34.
Step2: Place the ns-allinone-2.34.tar.gz file in your home folder(/home/samir in my case). Right click on the package and extract the contents in the same home folder.
Step3: Next, open the Terminal(Applications–>Accessories–>Terminal in ubuntu)
Step4: Change to ns-allinone-2.34 directory
Step5: First, Install the dependencies
Note that we are downgrading the gcc version, as ns2.34 works well with gcc4.3
Edit Makefile.in found at this location ns-allinone-2.34/otcl-1.13/Makefile.in as follows:
Find the line that says:
CC= @CC@
and change it to:
CC= gcc-4.3
Step6: Begin ns2.34 installation
Step7: Once the installation is successful i.e. without any errors, we need to add the path information to the file ~/.bashrc
Step8: Append the following lines to the file ~/.bashrc
Here replace /home/micman with the path to your home folder.
Step9: For the changes to take effect immediately, do the following:
Thats all!
type ns to see % and type nam to show the nam startup window. This shows your installation has been successful.
The nightmare days are over!
Now you dont have to spend hours on your linux distro(ubuntu) installing and validating ns2.x
Ubuntu 10.10 has greatly simplified things. You can now install ns,nam and xgraph by just a single command in the Terminal:
1 | $ sudo apt-get install ns2 nam xgraph |
Happy Ubuntuing .
PROCEDURE 2:
On heeding to my blog visitors requests, I would like to update this post with the steps to install ns2.34, the traditional way.Step1: Download ns-allinone-2.34 package from this <site>. I will be using ns version 2.34.
Step2: Place the ns-allinone-2.34.tar.gz file in your home folder(/home/samir in my case). Right click on the package and extract the contents in the same home folder.
Step3: Next, open the Terminal(Applications–>Accessories–>Terminal in ubuntu)
Step4: Change to ns-allinone-2.34 directory
1 | $ cd /home/micman/ns-allinone-2.34 |
1 | $ sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.3 |
Edit Makefile.in found at this location ns-allinone-2.34/otcl-1.13/Makefile.in as follows:
Find the line that says:
CC= @CC@
and change it to:
CC= gcc-4.3
Step6: Begin ns2.34 installation
1 | $ sudo su |
1 | # ./install |
1 | $ gedit ~/.bashrc |
01 | # LD_LIBRARY_PATH |
02 | OTCL_LIB=/home/samir/ns-allinone-2.34/otcl-1.13 |
03 | NS2_LIB=/home/samir/ns-allinone-2.34/lib |
04 | X11_LIB=/usr/X11R6/lib |
05 | USR_LOCAL_LIB=/usr/local/lib |
06 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB |
07 |
08 | # TCL_LIBRARY |
09 |
10 | TCL_LIB=/home/samir/ns-allinone-2.34/tcl8.4.18/library |
11 | USR_LIB=/usr/lib |
12 | export TCL_LIBRARY=$TCL_LIB:$USR_LIB |
13 |
14 | # PATH |
15 |
16 |
|
|
| XGRAPH=/home/samir/ns-allinone-2.34/bin:/home/samir/ns-allinone-2.34/tcl8.4.18/unix:/home/samir/ns-allinone-2.34/tk8.4.18/unix |
17 |
18 | # Note: the above two lines starting from XGRAPH should come in the same line |
|
20 | NS=/home/samir/ns-allinone-2.34/ns-2.34/ |
21 | NAM=/home/samir/ns-allinone-2.34/nam-1.14/ |
22 | PATH=$PATH:$XGRAPH:$NS:$NAM |
Step9: For the changes to take effect immediately, do the following:
1 | $ source ~/.bashrc |
type ns to see % and type nam to show the nam startup window. This shows your installation has been successful.
No comments:
Post a Comment