next up previous
Next: Installation for Cygwin Up: Installation Previous: Installation

Installation for Linux

We will now explain the step-by-step procedure for installing the patch. We will assume that you are installing ns-allinone-2.31 from scratch. The procedure is almost identical for other versions of ns-allinone, or if you want to patch an already installed source and re-install it.

Put the files patch-dl-ns-2.31 and ns-allinone-2.31 in your directory of choice, e.g., /usr/local/src:

nicola@perlanera:/usr/local/src$ ls -la
total 206732
drwxrwsrwx 12 root   staff      4096 Jun 13 01:20 .
drwxrwsrwx 15 root   staff      4096 Jun  3 23:01 ..
-rw-r--r--  1 nicola nicola 70466306 Jun 13 01:09 ns-allinone-2.31.tar.gz
-rw-r--r--  1 nicola nicola    19681 Jun 13 01:20 patch-dl-ns-2.31

Unpack ns-allinone-2.31:

nicola@perlanera:/usr/local/src$ tar xzvf ns-allinone-2.31.tar.gz

Now apply the patch:

nicola@perlanera:/usr/local/src$ patch -p0 < patch-dl-ns-2.31
patching file ns-allinone-2.31/ns-2.31/common/packet.cc
patching file ns-allinone-2.31/ns-2.31/common/packet.h
patching file ns-allinone-2.31/ns-2.31/common/ptypes2tcl.cc
patching file ns-allinone-2.31/ns-2.31/trace/cmu-trace.cc
patching file ns-allinone-2.31/ns-2.31/trace/cmu-trace.h
patching file ns-allinone-2.31/ns-2.31/tcl/lib/ns-default.tcl
patching file ns-allinone-2.31/ns-2.31/tcl/lib/ns-lib.tcl
patching file ns-allinone-2.31/ns-2.31/Makefile.in

Finally, install ns:

nicola@perlanera:/usr/local/src$ cd ns-allinone-2.31
nicola@perlanera:/usr/local/src/ns-allinone-2.31$ ./install

Of course, remember to set the LD_LIBRARY_PATH and TCL_LIBRARY environmental variables as told by the screen output of the installation process.

If you have installed ns-2.31, tcl, otcl & all the rest separately (i.e., if you do not use ns-allinone), you'll have to adjust the above reported instructions to your particular configuration.

To check if everything went OK, you can try one of the sample dynamic libraries we provide in the sample modules section. For instance, suppose we download the dynamic library tcp-veno package and put it ito /usr/local/src. To check if it is working properly, you have to do the following steps:

unpack tcp-veno-1.0.2.tar.gz:

nicola@perlanera:/usr/local/src$ tar xzvf tcp-veno-1.0.2.tar.gz

configure it in this way (remember to adjust the paths to your particular configuration):

nicola@perlanera:/usr/local/src$ cd tcp-veno-1.0.2
nicola@perlanera:/usr/local/src/tcp-veno-1.0.2$ ./configure --with-ns-allinone=/usr/local/src/ns-allinone-2.31/

build the package:

nicola@perlanera:/usr/local/src/tcp-veno-1.0.2$ make

finally, try running the provided sample script (again, adjust the paths or set the PATH environmental variable so it includes the location of the ns executable we built before):

nicola@perlanera:/usr/local/src/tcp-veno-1.0.2$ cd samples
nicola@perlanera:/usr/local/src/tcp-veno-1.0.2/samples$ ../../ns-allinone-2.31/bin/ns test-veno.tcl

If everything went fine, you have a ns installation with support for dynamic libraries enabled.


next up previous
Next: Installation for Cygwin Up: Installation Previous: Installation
nsmiracle-users mailing list