Sunteți pe pagina 1din 16

Complete guide for installation of cygwin and ns2.

35 on windows 7 with problems solution


With the name of allah who is almighty, I m first of all thankful to engr gul zameen khan(my teacher) by introducing me to ns2 and give me the task to install ns2. I am thankful to GOD who help and give strenght to me for accomplishing this task. Hope it will help alot.

1 1

5/12/12 Nasirahmad B.S Telecom

Installing Cygwin 1.7.1


goto the link http://www.cygwin.com/ Run the file setup.exe you will get this, follow the same wizard with
Keep hitting next and provide directory informatio n 5/12/12

2 2

1. click next in the wizard , click install from the

internet and next,

2. choose the dirctory where you want to install

the cygwin, click for all users, click next


3. select local package directory, place where

you have stored the setup


4. select your network connection, click on

direct connection and then next

5. select mirror site which is near to your area

choose the mirror country wise click this link http://cygwin.com/mirrors.html


3 3 5/12/12 6. wait for launching till the package directory

Windows Use cygwin


1. Required package: 2. gcc4, gcc4-g++, gawk, tar, gzip, make,

patch, perl, w32api

3. Graphic package: 4. xorg-server, xinit, libX11-devel, libXmu-devel 5. For editor use following packages. I found

these best

6. Nano, vim

4 4

5/12/12

Installing Cygwin 1.7.1


When you hit this page, choose the required (e.g., gcc4) and optional packages Search
the package name here Click here it will change to install

(Repeat the process For each package

When you Separately)


5 5

are done, hit next

5/12/12

After packages downloads and installation

(both are automatically complete) you will se the cygwin icon on the disktop the same.

Hope you will get no problem when you follow

Congrates you have done successfully.


6 6 5/12/12

Installing NS2.35
1.To download the new version follow this link

http:// sourceforge.net/projects/nsnam/files/allinone/ns1.Copy the downloded ns 2.35 file in cygwin/home. (I have copy it in C:/cygwin/home through mouse) 2. Open Cygwin by clicking the icon on the desktop
7 7

3.Now write pwd without inverted commas it will show your present working directory. 5/12/12 ( I have got like /home/lenovo).

To enter into any directory simply write $cd /home ;press enter home is the directory name $ls ; it will show the list of containing files in yours directory 4.Now goto that directory in which you have copied the ns2.35. (I have done so cd ..,now I am in /home directory.). 5. Extract the package by writing this. tar -xvf ns-allinone-2.35-RC3.tar
8 8

(be careful write the same name of ns 5/12/12 file what you have coppied) (I have

A. $cd ns-allinone-2.35

;(press enter)

B.

$./install

A. Wait for installation to complete. B. Now if you have at the end of the window

the same like below then its ok you have done it.

9 9

5/12/12

10 10

5/12/12

Now the most difficult thing is to set your

bashrc file. Be careful I have wasted much of my time on this. But hope you will not.

Cd ~/ nano ~/.bashrc Now simply copy the page # 13 text and past

it in the terminal. Only change the path (dont confuse with this is so simple put your place where you have install the ns-allinone-2.35, I have install it in home/ns-allinone-2.35/ you have to write your own.)
Once you made it you can copy
11 11

Or manually store the bashrc file in etc folder in 5/12/12 cygwin through mouse.

Be careful to write otcl8.5.10,tk1.14,ns2.35,

e.tc file names, because it changes with change of ns version.

Important to note: When you entering a directory by this

command

Cd /home

.when you enter in terminal you can check it also in your computer by openning C, then cygwin, then home, then nsallinone-2.35 through mouse.

12 12

5/12/12

# LD_LIBRARY_PATH OTCL_LIB=/home/ns-allinone-2.35/otcl-1.14 NS2_LIB=/home/ns-allinone-2.35/lib X11_LIB=/usr/X11R6/lib USR_LOCAL_LIB=/usr/local/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB: $USR_LOCAL_LIB # TCL_LIBRARY TCL_LIB=/home/ns-allinone-2.35/tcl8.5.10/library USR_LIB=/usr/lib export TCL_LIBRARY=$TCL_LIB:$USR_LIB 13 # PATH 13 5/12/12

After pasting press ctrl+o to save the .bashrc

file. Now press enter and then ctrl+x to exit

Now write the command $source ~/.bashrc Now your terminal can get hang close it it will

say for lossing donot worry click ok

Now try again open the terminal and type $ns %

you will get this congratullation you have install successfully

14 14

5/12/12

Now enter to home then to ns-allinone-2.35

then 2.35 using the command

$cd /home/ns-allinone-2.35/ns2.35 $./validate It will take much time than installation If you have this you are succesful

15 15

5/12/12

restart the system. To check whether ns is installed successfully

or not, test it by entering $ns

If you are prompted with %, it means your

installation is successful otherwise check your environment variables, specifically compare the versions of otcl, nam etc in./bashrcwith those in yourns-allinone-2.35.

Pressexitto go back from %.

16 16

5/12/12

S-ar putea să vă placă și