Está en la página 1de 26

A complete guide

November 11
Installing
Cygwin
& NS2.35 2010
NS2 installation had been a big challenge for me . It was a
nightmare but I succeeded. Here I am telling how I did it By Rubaiyat Bin Sattar
in my laptop ->> { vista home premium + Cygwin set up ranganbd@gmail.com
version 2.721 + ns-allinone-2.35-RC7 }
The very first thing that you have to do is to check the computer name and make sure
there is no space in the name. To do so here is the procedure ->>

Start > Run > {type regedit and hit enter or click ok} and it will show the Registry editor like the
picture below .
Expand HKEY_LOCAL_MACHINE > Software >Microsoft > Windows NT
Under Windows NT There is CurrentVersion . Click on it and you will see something like
below . From right side of the screen double click on RegisterOwner and checked/changed.
Download Ns2.35 :
http://www.isi.edu/nsnam/dist/release/ns-allinone-2.35-RC7.tar.gz

Download Cygwin setup file :


http://www.cygwin.com/setup.exe

Now run the cygwin setup file :


Download the all packages ( approx 1.6 Gb) from cygwin mirror server and save it
in local hard disk. After that start the installation ….

*Remember->> Download and installation will be in different folder.


If you want to install it in C drive ( mainly the root /primary where windows
installed ) than C:\cygwin is fine but if you want to install it in different drive
than you have to change it this way D:/cygwin or E:/cygwin or F:/cygwin .
“/” is a vital issue in this case .
Look what I did . Installing in Drive C and downloading in Drive D . If you have
only one drive then download it in different folder ( example : C:\new
folder\cygwin .. All downloaded file will be stored under this folder with site
name . Don’t worry if you lost internet connection in middle of the download .
After reconnecting download again and it will start from last saved .
Click Ok and in next window select “install” which will download all packages
Click “next” button & the main download will start . Wait and wait because it is
1.6 GB LoL
After the whole download a installation will start automatically . It will take
approximate 1 hour to install the whole packages. Remember one thing this 1.6
Gb installing file will take 5 GB from your hard disk .

Well , let me tell you how I install it after


download . The safe way :
I didn’t run install in drive C .

In downloading time I selected drive C but after completing download I stopped


the installation by cancel button ; also deleted the folder of Cygin from C (my
root ) drive. I used 2 procedures for the safe installation and here it is ->>

I downloaded the whole packages in Drive D in cygwin folder and it’s saved there
under a folder named http%3a%2f%2fcygwin.mirrors.hoobly.com%2f . This is
basically the mirror location. It may differ from mirror to mirror .
Now Installing in Drive E . Look carefully it is “E:/” because windows in not install in drive E .
It is in drive C .

Selecting the folder where i downloaded the cygwin packages .


Select Packages Step 1

Search these all packages and select version for installation. After that as usual “next”

gcc4, gcc4-g++, gawk, tar, gzip, make, patch, perl, w32api, xorg-server, xinit,
libX11-devel, libXmu-devel
When it finished, I started the installation again like before
but now for full installation. It will take 1 hour (approx).
AND ITS DONE
Now NS2 Installation :
1) Copy ns-allinone-2.35-RC7.tar.gz to directory E:/cygwin/usr/local
2) Open Cygwin ( there will be cygwin icon in your desktop )
3) Go to usr/local directory by typing (look the picture below )
4) Extract the package by calling» tar -xvf ns-allinone-2.35-RC7.tar.gz

This command will extract the tar file or you can manually extract
the NS file . After extracting a ns-allinone-2.35-RC7 folder will be
created.
Go to ns-allinone-2.35-RC7 folder by typing command and call
./install

It will take 30 minite to 1 hour or more to install the NS2.


Attention: After finishing the installation , some comments will come out. Saved
those all .. Comments sample :

Please put /usr/local/ns-allinone-2.35-RC7/bin:/usr/local/ ns-allinone-2.35-


RC7/tcl8.5.8/unix:/usr/local//ns-allinone-2.35-RC7/tk8.5.8/unix into your
PATH environment; so that you'll be able to run
itm/tclsh/wish/xgraph.

IMPORTANT NOTICES:
(1) You MUST put /usr/local/ ns-allinone-2.35-RC7/otcl-1.14,
/usr/local/ ns-allinone-2.35-RC7/lib, into your LD_LIBRARY_PATH
environment variable.
If it complains about X libraries, add path to your X libraries into
LD_LIBRARY_PATH.

If you are using csh, you can set it like:


setenv LD_LIBRARY_PATH <paths>
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=<paths>

(2) You MUST put /usr/local/ ns-allinone-2.35-RC7/tcl8.5.8/library into your


TCL_LIBRARY environmental variable. Otherwise ns/nam will
complain during startup.

If you find your notice is different, then make sure to according


to your own notice.

{After these steps, you can now run the ns validation suite with
./validate Command under ns-allinone-2.35-RC7 folder . But this is
optional . }
The Most important Part : Configure system
variables:

My Computer > Properties >

Windows Xp ->>> advanced> environment variable

Windows Vista & 7 >> Advance system


setting > environment variable
Environment variable Box :

In system variable you may see there already a variable named “Path”
If not than Create New system variable named “Path”

And set the variable value according to the comments that came after installing of
NS2.

Example : my variable value is :

E:/cygwin;/usr/local/ns-allinone-2.35-RC7/bin;/usr/local/ns-allinone-2.35-
RC7/tcl8.5.8/unix;/usr/local/ns-allinone-2.35-RC7/tk8.5.8/unix;C:\Program
Files\WIDCOMM\Bluetooth Software\;C:\Program Files\Broadcom\Broadcom
802.11\Driver

Only the bold part is important for cygwin case . Windows set many variable
under Path . Look how it is set .

Add the path separated with “;” make sure to not change the existing path.

Next go to cygwin and type the following content :

Export :
“LD_LIBRARY_PATH=/usr/local/ns-allinone-2.35-RC7/otcl-1.14”
“LD_LIBRARY_PATH=/usr/local/ns-allinone-2.35-RC7/lib”

Export:
“TCL_LIBRARY_PATH=/usr/local/ns-allinone-2.35-RC7/tcl8.5.8/library”

These are one single line . No space in between . Careful about that
Done ! NS2 is ready to execute file 
“startxwin” command will bring this window
Hurray !!!

También podría gustarte