Author: Wood. Reprint please indicate the source. The installation package can be downloaded from my release.
Time: January 9, 2013.
Test operating system bad: Windows XP SP3.
Given the variety of inexplicable, bug-ridden installation methods that are circulating on the web, and the many successful methods that have been "Devid". I finally summed up the detailed CYGWIN+NS2+XP installation steps under XP after several days ' summary. Especially the package installation, not one-time, in order to prevent eating wrong, it is best to install the base package first.
"Note" Installation, please turn off the anti-virus software (Jinshan, rising, Kabbah and so on)
————————————————— Gorgeous split Line ————————————————
First, Cygwin installation:
Step 1th: Locate the Cygwin under the installation folder, double-click the installer.
2nd Step: Encounter pop-up window point OK, do not empty. Next
3rd step: Select a local installation (third). Select After next.
Step 4th: Leave the default Root:c:\cygwin;default Text File type to remain the default (Unix)
Step 5th: Browser to the Sourcepackages under the installation folder. Next
6th step: Continue to the next step
7th Step: Base Pack Installation Complete
Step 8th: Rerun, the others are all the same until the pop-up
9th step: Click on the top right corner of the "View" button, switch to full mode, the lower left corner of hide obsoletepackages uncheck; Use the search in the upper left corner to select the following installation package, (click Skip to display the version number, As shown in the figure) has been installed (displayed as a number) to hold on the line.
The installation package list is:
Gcc
gcc-g++
Make
Patch
Perl
Tar
X-startup-scripts
Tcltk
W32api
Diffutils
Libx11-devel
Libxext-devel
Xorg-x11-bin-dlls
Libxmu-devel
LibXmu6
Libxt-devel
Xfree86-base
Xfree86-bin
Xfree86-prog
Xfree86-lib
Xfree86-etc
10th step: Next, patiently waiting to finish. Half an hour up and down.
11th Step: Complete.
Second, NS2 installation
The 1th step: Copy the ns-allinone-2.28.tar.gz under the NS2 folder under C:\cygwin\home\Administrator; "Note" If your computer named it yourself, Then the name of the administrator is the same as the following.
2nd step: Double-click the Cygwin terminal on the desktop, enter after opening: (Decompression operation)
Tar Xvfz ns-allinone-2.28.tar.gz
3rd step: Patiently wait for the decompression completed, in the current directory to generate a folder: ns-allinone-2.28
(a) After the decompression completes, returns to the win the operation, enters the ns-allinone-2.28/nam-1.11, agent.h the 73rd line in the document the "null" to "0";
(b) The files in the following 5 directories were then opened under WinXP:
Ns-allinone-2.28/tcl8.4.5/unix/configure
Ns-allinone-2.28/tcl8.4.5/unix/tcl.m4
Ns-allinone-2.28/tk8.4.5/unix/configure
Ns-allinone-2.28/tk8.4.5/unix/tcl.m4
Ns-allinone-2.28/otcl-1.9/configure;
To change the. Relid ' in the above file to. relid, please use the UE editor, notepad++ one;
4th Step: Input: cd ns-allinone-2.28 carriage return
5th step: Enter./install patiently wait to finish it.
Step 6th: If you see the following information, you become CYGWIN+NS2 installed talent.
NAM has been installed successfully.
Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.4.11:/home/pcraven/ns-allinone-2.29/{bin,include,lib}
tk8.4.11:/home/pcraven/ns-allinone-2.29/{bin,include,lib}
OTCL:/home/pcraven/ns-allinone-2.29/otcl-1.11
TCLCL:/home/pcraven/ns-allinone-2.29/tclcl-1.17
NS:/home/pcraven/ns-allinone-2.29/ns-2.29/ns
NAM:/home/pcraven/ns-allinone-2.29/nam-1.11/nam
Xgraph:/home/pcraven/ns-allinone-2.29/xgraph-12.1
GT-ITM:/home/pcraven/ns-allinone-2.29/itm, Edriver, Sgb2alt, Sgb2ns, Sgb2comns, Sgb2hierns
----------------------------------------------------------------------------------
Please put/home/myusername/ns-allinone-2.29/bin:/home/myusername/ns-allinone-2.29/tcl8.4.11/unix:/home/ Myusername/ns-allinone-2.29/tk8.4.11/unix
into your PATH environment; So, you'll be able to run itm/tclsh/wish/xgraph.
IMPORTANT Notices:
into your LD_LIBRARY_PATH environment variable.
Into Ld_library_path.
If you are using CSH, can set it like:
Setenv Ld_library_path <paths>
If you are are using SH, can set it like:
Export ld_library_path=<paths>
(2) must put/home/myusername/ns-allinone-2.29/tcl8.4.11/library into your tcl_library environmental
Variable. Otherwise Ns/nam would complain during startup.
and tk8.4.11. They are now installed Under/home/myusername/ns-allinone-2.29/{bin,include,lib}
After this steps, you can now run the NS validation suite with
CD ns-2.29;/validate
Http://www.isi.edu/nsnam/ns/ns-problems.html. Also Search the NS mailing list archive
For related posts.
7th step: Do not be happy after the installation is too early, but also to make the following changes:
(1) Copy the Nam.exe under the NS2 folder to the directory (if you already have it, please overwrite it): C:\cygwin\home\Administrator\ns-allinone-2.28\nam-1.11
(2) Open C:\cygwin\home\Administrator under the. bashrc file, append the following code to the file:
Export ns_home= ' pwd '/ns-allinone-2.28
Export path= $NS _home/tcl8.4.5/unix: $NS _home/tk8.4.5/unix: $NS _home/bin: $PATH
Export ld_library_path= $NS _home/tcl8.4.5/unix: $NS _home/tk8.4.5/unix: $NS _home/otcl-1.9: $NS _home/lib: $LD _library_ PATH
Export tcl_library= $NS _home/tcl8.4.5/library
8th step: Return to Cygwin window, enter Startxwin.bat to see it. If it succeeds, it's OK.
The following operation of the NS2 I do not say, that ' s yourbusiness!
Reference documents:
[1] Cygwin official website: http://www.cygwin.com/
[2] ns2.27 installation: http://www.isi.edu/nsnam/ns/ns-cygwin-old.html
[3] NS installation under UNIX: Http://nsnam.isi.edu/nsnam/index.php/Downloading_and_installing_ns-2
[4] ns2 under Windows:
Http://nsnam.isi.edu/nsnam/index.php/Running_Ns_and_Nam_Under_Windows_9x/2000/XP_Using_Cygwin