doc/manual/compiling.html
changeset 0 2b3e5ec03512
equal deleted inserted replaced
-1:000000000000 0:2b3e5ec03512
       
     1 <html>
       
     2 <head>
       
     3 <title> DTN2 Manual: Compiling DTN2 </title>
       
     4 <link rel="stylesheet" type="text/css" href="manual.css" />
       
     5 </head>
       
     6 <body>
       
     7 <h1>Compiling DTN2
       
     8 </h1>
       
     9 
       
    10 <p>
       
    11 
       
    12 <h2>Compilation / Installation Instructions</h2>
       
    13 <p>---------------------------------------
       
    14 <p>
       
    15 At the moment, DTN2 comes in source form only. Before you can install
       
    16 it and start using it, you need to compile it.
       
    17 
       
    18 <h2> On Unix </h2>
       
    19 
       
    20 <p>
       
    21 First, download DTN2 and ensure it has met all <a href="#requirements">requirements</a>. For released versions, see the <a href="http://sourceforge.net/project/showfiles.php?group_id=101657">SourceForge DTN2 release Page</a> and unpack the release.
       
    22 
       
    23 <blockquote><pre>$ gunzip -c DTN2-X.Y.Z.tgz | tar xvf -</pre></blockquote>
       
    24 
       
    25 <p>For the latest ("bleeding edge") version of the code see the section on <a href="#Mercurial">Mercurial</a>
       
    26 <p>Next, configure and compile DTN2: (the -C argument to configure
       
    27 enables the cache which speeds up the process)
       
    28 
       
    29 <blockquote><pre>$ cd DTN2
       
    30 $ sh configure -C
       
    31 $ make</pre></blockquote>
       
    32 
       
    33 <p>Note that by default, the configure script will also run configure
       
    34 inside the oasys/ subdirectory. The -C argument enables the autoconf
       
    35 variable cache, which speeds up configuration. 
       
    36 
       
    37 <p>Note that if you need to make changes to the configure.ac script or
       
    38 one of the helper scripts in aclocal/*.ac, run build-configure.sh to
       
    39 recreate configure and then check in both your changes as well as the
       
    40 newly generated configure script.
       
    41 
       
    42 <p>If you just want to play with DTN2 to learn how it works, you can
       
    43 stop here. You can use all the programs as a regular user, with them
       
    44 in the source code directories. There's no need to do a full install
       
    45 into the public part of the filesystem. However, if you are deploying
       
    46 DTN2, you'll want to take a look at the <tt>tools/install.sh</tt>
       
    47 script. You might want to customize it, as it currently puts the files
       
    48 into <tt>/usr</tt>, and some people prefer to put files in
       
    49 <tt>/usr/local</tt>.
       
    50 
       
    51 <a name="Mercurial"/>
       
    52 <h3>Mercurial</h3>
       
    53 
       
    54 <p>You can also access the latest ("bleeding edge") version of the code using mercurial. The various repositories are hosted at the DTNRG SourceForge <a href="http://dtn.hg.sourceforge.net/hgweb/dtn/">repositories</a> and can be cloned using:
       
    55 <blockquote><pre>
       
    56  % hg clone http://dtn.hg.sourceforge.net/hgweb/dtn/oasys
       
    57  % hg clone http://dtn.hg.sourceforge.net/hgweb/dtn/DTN2 
       
    58 </pre></blockquote>
       
    59 <p> See <a href="http://www.dtnrg.org/wiki/UsingMercurial">Using Mercurial</a> for more information on using mercurial. Please be aware this code may be under frequent developmental changes, so your mileage may vary. For detailed information on using mercurial with the <a href="http://dtn.hg.sourceforge.net/hgweb/dtn/">SourceForge repositories</a> please see the mercurial <a href="http://sourceforge.net/apps/trac/sourceforge/wiki/Mercurial#Access">access mechanisms</a>. In addition, if you grab the development copy in this way, any README files or other docs may not be quite up to date.
       
    60 
       
    61 <p>If you plan on contributing code changes, please read the <a href="http://www.dtnrg.org/docs/code/DTN2/CONTRIBUTING">CONTRIBUTING</a> file that describes the coding conventions for the project.
       
    62 
       
    63 <p>Please report any bugs to the <a href="https://sourceforge.net/tracker/?group_id=101657&atid=630167">Bugs tracker</a>.
       
    64 
       
    65 <h2>Getting Started</h2>
       
    66 ---------------
       
    67 
       
    68 <p>A good place to start for playing around with DTN is to look at the
       
    69 manual and tutorials (see doc/manual/index.html). This set of
       
    70 documentation explains some of the configuration and applications. If
       
    71 you find omissions or errors, please feel free to post updates and
       
    72 corrections to dtn-users@mailman.dtnrg.org.
       
    73 
       
    74 <h2>Reporting Bugs / Other Help</h2>
       
    75 ---------------------------
       
    76 <p>A <a href="http://sourceforge.net/tracker/?group_id=101657&atid=630167">bug tracking system</a> is in place. Please direct bug reports to and
       
    77 direct questions to dtn-bugs@mailman.dtnrg.org.
       
    78 
       
    79 <h3>DTN2 Directory Structure</h3>
       
    80 ------------------------
       
    81 <p>
       
    82 <blockquote><pre>
       
    83 applib/		    application interface library and ipc layer
       
    84 |-- perl	    Perl interface adaptor
       
    85 |-- python	    Python interface adaptor
       
    86 |-- tcl		    TCL interaface adaptor
       
    87 apps/		    example dtn applications
       
    88 doc/		    documentation
       
    89 daemon/		    dtn router daemon sources
       
    90 ideas/		    temporary code idea repository
       
    91 servlib/	    dtn router internals
       
    92 |-- bundling	    bundle management and forwarding logic
       
    93 |-- cmd		    tcl based command interface
       
    94 |-- contacts
       
    95 |-- conv_layers	    convergence layers
       
    96 |-- discovery
       
    97 |-- gcm
       
    98 |-- naming	    endpoint identifier schemes
       
    99 |-- prophet	    prophet router 
       
   100 |-- reg		    local registrations
       
   101 |-- routing	    bundle routing logic
       
   102 |-- security	    bundle security protocol
       
   103 |-- session
       
   104 `-- storage	    persistent storage management
       
   105 sim/		    simulation framework
       
   106 test/		    unit tests and other test files
       
   107 test-utils/	    test scripts and utilities
       
   108 </pre></blockquote>
       
   109 <a name="requirements"/>
       
   110 <h2>External Requirements</h2>
       
   111 ---------------------
       
   112 <p>
       
   113 <ul>
       
   114 <li>oasys-1.3.0+ (see <a href="#Oasys">Note</a> on Oasys)
       
   115 <li>gcc/g++
       
   116 </ul>
       
   117 <h2>Optional External Packages</h2>
       
   118 --------------------------
       
   119 <p>
       
   120 <ul>
       
   121 <li>bonjour
       
   122 </ul>
       
   123 
       
   124 <h2>Optional Internal Packages</h2>
       
   125 --------------------------
       
   126 <p>
       
   127 <ul>
       
   128 <li>NORM convergence layer support
       
   129 <li>Bundle Security Protocol support (see <a href="#BSP">Note</a> on BSP)
       
   130 </ul>
       
   131 
       
   132 <a name="Oasys"/>
       
   133 <h3>Note - Oasys/</h3>
       
   134 --------------------------
       
   135 <p>Before compiling DTN2 please compile Oasys-1.3.0+ (must be 
       
   136 installed or located in DTN2 or ../). For released versions, see the <a href="http://sourceforge.net/project/showfiles.php?group_id=101657">SourceForge DTN2 release Page</a> and unpack the release.
       
   137 
       
   138 <blockquote><pre>$ gunzip -c oasys-X.Y.Z.tgz | tar xvf -</pre></blockquote>
       
   139 
       
   140 <p>For the latest ("bleeding edge") version of the code see the section on <a href="#Mercurial">Mercurial</a>
       
   141 <p>Next, configure and compile oasys:
       
   142 
       
   143 <blockquote><pre>$ cd oasys (or oasys-X.Y.Z)
       
   144 $ sh configure
       
   145 $ make</pre></blockquote>
       
   146 
       
   147 <p>Support for the
       
   148 following DTN2 options should be specified when configuring
       
   149 oasys
       
   150 
       
   151 <p>specify location / support of:
       
   152 <ul>    
       
   153 <li>    Python 
       
   154 <li>    tcl                  
       
   155 <li>    google perftools
       
   156 <li>    expat
       
   157 <li>    xerces-c
       
   158 <li>    xsd tool
       
   159 <li>    Berkeley DB                  
       
   160 <li>    mysql 
       
   161 <li>    postgres             
       
   162 </ul>
       
   163 <p>compile with or without support for:
       
   164 
       
   165 <ul>
       
   166 <li>    bluetooth 
       
   167 <li>    zlib 
       
   168 <li>    tclreadline
       
   169 <li>    profiling
       
   170 <li>    google profiling
       
   171 <li>    assembly-based atomic functions
       
   172 </ul>
       
   173 <p>enable or disable:
       
   174 <ul>
       
   175 <li>    oasys debugging
       
   176 <li>    oasys memory debugging
       
   177 <li>    oasys lock debugging
       
   178 <li>    oasys optimization
       
   179 </ul>
       
   180 <a name="BSP"/>
       
   181 <h2> Installation of BSP</h2>
       
   182 --------------------------
       
   183 <p>The standard ciphersuites require, amongst other things, 
       
   184 an implementation of sha-256 message digest algorithm.
       
   185 
       
   186 <p>The DTN reference code uses OpenSSL for cryptographic
       
   187 and related functions. Unfortunately, some versions of
       
   188 OpenSSL do not include sha-256.
       
   189 
       
   190 <p>The "configure" process checks for the availability of
       
   191 sha-256 and provides an error if it is not found.
       
   192 
       
   193 <p>If your system's OpenSSL does not have sha-256 then you 
       
   194 can either upgrade it or build and use a local  version 
       
   195 of OpenSSL. OpenSSL can be obtained from
       
   196 <a href="http://www.openssl.org">openssl.org</a>
       
   197 
       
   198 <p>OpenSSL 0.9.8 version include sha-256 by default. If your
       
   199 system uses version 0.9.7 and you do not wish to upgrade
       
   200 then you can enable sha-256 in later versions of 0.9.7,
       
   201 such as 0.9.7l and 0.9.7m. To enable sha-256, specify "fips"
       
   202 when running "Configure".
       
   203 
       
   204 <p>If you wish to leave your system installation untouched and
       
   205 build against a local version, then configure dtn using
       
   206 <tt>./configure --with-bsp --with-openssl=<i>/path/to/openssl</i></tt>
       
   207 
       
   208 <p>Mac OS X note: for Mac OS X users ONLY. If you build dtn
       
   209 against a local OpenSSL using "--with-openssl=/path/to/openssl"
       
   210 you MUST also specify with it LDFLAGS="-Wl,-search_paths_first". 
       
   211 The configuration for OS X users would then be 
       
   212 <tt>./configure --with-bsp --with-openssl=<i>/path/to/openssl LDFL</i></tt>
       
   213 <p>
       
   214 
       
   215 <h2> Installation of norm</h2>
       
   216 --------------------------
       
   217 <p>Please see the norm <a href="cl-norm.html#install_norm">installation</a> instructions.
       
   218 
       
   219 <h2> On Windows </h2>
       
   220 
       
   221 <p>
       
   222 DTN2 does not yet work as a native Windows application. It might,
       
   223 however, work with the <a href="http://www.cygwin.com">Cygwin</a>
       
   224 environment.
       
   225 
       
   226 <h3> Install Cygwin </h3>
       
   227 
       
   228 <p>
       
   229 The first step is to install Cygwin on your computer. The best way to
       
   230 do this is to download <a
       
   231 href="http://cygwin.com/setup.exe">setup.exe</a> from their website.
       
   232 We suggest storing it on your computer in a new directory you make
       
   233 named <tt>c:\cygwin\download</tt>.
       
   234 
       
   235 <p>
       
   236 Start <tt>setup.exe</tt> and choose "Install from Internet". (Always
       
   237 think carefully before running an executeable you downloaded from
       
   238 the Internet, even if a nice manual like this told you to do it!
       
   239 Is your virus checker running? Is it up to date? Did the file come from the
       
   240 website you think it did?)
       
   241 Use the default root directory, <tt>c:\cygwin</tt>.
       
   242 Make the "Local Package Directory" <tt>c:\cygwin\download</tt>. Cygwin
       
   243 will ask you to choose a mirror, so choose one that is close to you on the
       
   244 Internet. It will then ask you to "Select Packages". The defaults here
       
   245 are pretty good, but you need to make a few changes:
       
   246 
       
   247 <ul>
       
   248 <li> Open Database and ensure that <b>db4.3</b>, <b>libdb4.3</b>
       
   249 and <b>libdb4.3-devel</b> are selected for installation.
       
   250 <li> Open Editors and ensure an editor you like and know how to use is
       
   251 selected.
       
   252 <li> Open Libs, and check that the <b>tcltk</b>
       
   253 and <b>sunrpc</b> packages will be installed.
       
   254 </ul>
       
   255 
       
   256 <p>
       
   257 Continue with the installation. When it is done, you'll have a working
       
   258 Cygwin installation and be ready to proceed. If you are asked to
       
   259 reboot, please do so. This ensures the correct version of Cygwin will be
       
   260 used.
       
   261 
       
   262 <h3> Compile using Cygwin </h3>
       
   263 
       
   264 <p> Once you have installed Cygwin, you'll have a new item in your
       
   265 Start -&gt; All Programs menu called Cygwin, and inside that, one
       
   266 called Bash.  When you select it, you get a <tt>bash</tt> shell, which
       
   267 is like a <tt>CMD</tt> window, only cooler. You start out in your
       
   268 home directory, which in Cygwin is <tt>/home/$user</tt>, but in
       
   269 Windows, it is <tt>c:\cygwin\home\$user</tt>. Now that you have a
       
   270 Unix-like window, follow the Unix instructions above. Cygwin comes
       
   271 with CVS, so you can even use CVS to fetch the source code, as
       
   272 described above.
       
   273 
       
   274 </body>
       
   275 </html>
       
   276