AMAZON

Showing posts with label cygwin. Show all posts
Showing posts with label cygwin. Show all posts

Monday, July 16, 2012

How to install Ns-2 doc linux/windows


-->

NS2 Installation Procedure (For Root User)

  • Check for the complete LINUX installation (with all the options enabled during installation) in the system.
  • During installation of NS2 its better to get into the ROOT login.
  • Copy the given ns-allinone-2.34.tar.gz file in the root directory.
  • Extract the files in the same folder using extract option or the command in the terminal as

root>tar -zxvf ns-allinone-2.34.tar.gz

  • The files will be extracted in the newly created folder as ns-allinone-2.34.
  • Now go to the terminal and get into the folder ns-allinone-2.34 and do the following
Root> cd ns-allinone-2.34
Root/ns-allinone-2.34 >./install

  • This command will run for 10-15 minutes. If it is a successful installation you will be getting IMPORTANT NOTICE notes (detailing about the paths to set)
  • Copy the ns-21 file given into the following folder

Computer/file system/etc/profile.d

  • Now close all the terminal and open a new terminal and get into the folder root/ns-allinone-2.34 and give ns command and you will be getting as below when you each time press ENTER key which indicates that the installation is complete .
      • Root/ns-allinone-2.34>./validate
Root/ns-allinone-2.34>ns
%
%
%exit
  • Now you can run the programs in a new terminal.

What ns-21 consists of??
It consist of path
PATH=$PATH:$HOME/bin:/root/ns-allinone-2.34/bin:/root/ns-allinone-2.34/tcl8.4.18/unix:/root/ns-allinone-2.34/tk8.4.18/unix
export LD_LIBRARY_PATH=/root/ns-allinone-2.34/otcl-1.13:/root/ns-allinone-2.34/lib
export TCL_LIBRARY=/root/ns-allinone-2.34/tcl8.4.18/library



NS2 Installation Procedure (For other User)
Open terminal window

Type $ su & give root password & follow the above mention procedure
For copying ns21.sh file use following command
cp<space><source path><space> <destination path(/etc/profile.d)>
How to create(Enable) a Root User
  • Step1
$ su (give password)
Now it becomes Root
cd <space>/etc/pam.d
Vim gdm
Remove # symbol from 3rd line
Vim gdm- password
Remove! Symbol from 3rd line end

How to install Ns-2 in Windows





 



Thursday, July 12, 2012

How to intall ns2 in windows using cywin (Windows + Cygwin + NS2)


--> This document will show you how to install my NS2 (ns-2.28 + all my modules) on Windows platform (windows 2000 or windows XP). 

If you follow each step in this webpage, you can successfully run all the simulation scripts provided me without installing each module. 

(It includes TKN 802.11e EDCF module, NOAH routing, MFlood, CSFQ, Poisson traffic, wireless random uniform and GE error model, and tcldebug.)2006/10/27 add “Evalvid-RA” and wimax “IEEE 802.16 module for ns2 (from NIST)”.

[Cygwin]
1.      Download the cygwin.rar.

2.      Decompress the cygwin.rar

1.      Click the setup.exe to install cygwin.

2.      Because the language of operating system is Traditional Chinese. The text of button is shown in Chinese. But you don’t need to worry about this. I think it is shown in English in your computer. Just click “Next”.

3.      Then choose “Install from Local Directory”

4.      Click “Next”.

(Just keep the settings as they are.) 
 
5.      Click “Next”

6. Click “Browse” to choose where the software is. (Please choose “ftp%3a%2f%2fftp.nctu.edu.tw%2fWindows%2fcygwin”)

7.      Click “OK”.

8.      Click “Next” and you will see the figure shown as follows. In this window, the cygwin setup program let you choose what software you want to install.

9.      Click “View” first to make the word “Category “change to “Full”.

10.  XFree86-base, XFree86-bin, XFree86-prog, XFree86-lib, XFree86-etc, make, patch, perl, gcc, gcc-g++, gawk, gnuplot, tar and gzip must be chosen. For example, if I want to install XFree-86 base (upper figure), click the “Skip” of “New” column. The “Skip” will be changed to “4.3.0-1” (lower figure).

11.  Click “Next”.

(Please be patient. It may take a long time to finish the installation.)

12.  When setup is done, it will be shown as following figure. Click “Finish”.

13.  Click “OK” to finish the cygwin setup program.
[myNS2 setup]

1.      Click the icon on the desktop.

2.      For the first time execution, it will generate some environment parameter setting files. In this example, smallko is my login name to windows system. Therefore, the cygwin will create a folder named “smallko” under home directory. (The actual path for smallko folder is: c:\cygwin\home\smallko) It should be noticed that the login name can not have any space in your name. For example, “A B” may cause errors when you install NS2.

3.      Download myNS2.

4.      Decompress the ns-allinone-2.28.rar.

5.      Move this folder under c:\cygwin\home\smallko. (change smallko (login name) with yours)

6.      Open a cygwin window

7.      Change the path to ns-allinone-2.28/ns-2.28

8.      Run the command “./configure; make clean; make

9.      Please be patient. It will take some time to finish the compilation.

10.  When it is done, it should look like as follows.

11.  To make sure that you have successfully installed myNS2, you need to check whether you can find ns.exe under ns-allinone-2.28/ns-2.28

12.  Copy the .bashrc to c:/cygwin/home/smallko 
 
13.  Run the example script to test whether you have setup the path or not.

14.  If you see the error message like “ns command not found”, no worry about this. Sometimes even you have setup the path, but it does not work. You can copy the ns.exe (nam.exe) to the same place as the simulation script. Run the simulation with “./ns.exe” and it will be ok.