doc/manual/compiling.html
changeset 0 2b3e5ec03512
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/manual/compiling.html	Thu Apr 21 14:57:45 2011 +0100
@@ -0,0 +1,276 @@
+<html>
+<head>
+<title> DTN2 Manual: Compiling DTN2 </title>
+<link rel="stylesheet" type="text/css" href="manual.css" />
+</head>
+<body>
+<h1>Compiling DTN2
+</h1>
+
+<p>
+
+<h2>Compilation / Installation Instructions</h2>
+<p>---------------------------------------
+<p>
+At the moment, DTN2 comes in source form only. Before you can install
+it and start using it, you need to compile it.
+
+<h2> On Unix </h2>
+
+<p>
+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.
+
+<blockquote><pre>$ gunzip -c DTN2-X.Y.Z.tgz | tar xvf -</pre></blockquote>
+
+<p>For the latest ("bleeding edge") version of the code see the section on <a href="#Mercurial">Mercurial</a>
+<p>Next, configure and compile DTN2: (the -C argument to configure
+enables the cache which speeds up the process)
+
+<blockquote><pre>$ cd DTN2
+$ sh configure -C
+$ make</pre></blockquote>
+
+<p>Note that by default, the configure script will also run configure
+inside the oasys/ subdirectory. The -C argument enables the autoconf
+variable cache, which speeds up configuration. 
+
+<p>Note that if you need to make changes to the configure.ac script or
+one of the helper scripts in aclocal/*.ac, run build-configure.sh to
+recreate configure and then check in both your changes as well as the
+newly generated configure script.
+
+<p>If you just want to play with DTN2 to learn how it works, you can
+stop here. You can use all the programs as a regular user, with them
+in the source code directories. There's no need to do a full install
+into the public part of the filesystem. However, if you are deploying
+DTN2, you'll want to take a look at the <tt>tools/install.sh</tt>
+script. You might want to customize it, as it currently puts the files
+into <tt>/usr</tt>, and some people prefer to put files in
+<tt>/usr/local</tt>.
+
+<a name="Mercurial"/>
+<h3>Mercurial</h3>
+
+<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:
+<blockquote><pre>
+ % hg clone http://dtn.hg.sourceforge.net/hgweb/dtn/oasys
+ % hg clone http://dtn.hg.sourceforge.net/hgweb/dtn/DTN2 
+</pre></blockquote>
+<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.
+
+<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.
+
+<p>Please report any bugs to the <a href="https://sourceforge.net/tracker/?group_id=101657&atid=630167">Bugs tracker</a>.
+
+<h2>Getting Started</h2>
+---------------
+
+<p>A good place to start for playing around with DTN is to look at the
+manual and tutorials (see doc/manual/index.html). This set of
+documentation explains some of the configuration and applications. If
+you find omissions or errors, please feel free to post updates and
+corrections to dtn-users@mailman.dtnrg.org.
+
+<h2>Reporting Bugs / Other Help</h2>
+---------------------------
+<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
+direct questions to dtn-bugs@mailman.dtnrg.org.
+
+<h3>DTN2 Directory Structure</h3>
+------------------------
+<p>
+<blockquote><pre>
+applib/		    application interface library and ipc layer
+|-- perl	    Perl interface adaptor
+|-- python	    Python interface adaptor
+|-- tcl		    TCL interaface adaptor
+apps/		    example dtn applications
+doc/		    documentation
+daemon/		    dtn router daemon sources
+ideas/		    temporary code idea repository
+servlib/	    dtn router internals
+|-- bundling	    bundle management and forwarding logic
+|-- cmd		    tcl based command interface
+|-- contacts
+|-- conv_layers	    convergence layers
+|-- discovery
+|-- gcm
+|-- naming	    endpoint identifier schemes
+|-- prophet	    prophet router 
+|-- reg		    local registrations
+|-- routing	    bundle routing logic
+|-- security	    bundle security protocol
+|-- session
+`-- storage	    persistent storage management
+sim/		    simulation framework
+test/		    unit tests and other test files
+test-utils/	    test scripts and utilities
+</pre></blockquote>
+<a name="requirements"/>
+<h2>External Requirements</h2>
+---------------------
+<p>
+<ul>
+<li>oasys-1.3.0+ (see <a href="#Oasys">Note</a> on Oasys)
+<li>gcc/g++
+</ul>
+<h2>Optional External Packages</h2>
+--------------------------
+<p>
+<ul>
+<li>bonjour
+</ul>
+
+<h2>Optional Internal Packages</h2>
+--------------------------
+<p>
+<ul>
+<li>NORM convergence layer support
+<li>Bundle Security Protocol support (see <a href="#BSP">Note</a> on BSP)
+</ul>
+
+<a name="Oasys"/>
+<h3>Note - Oasys/</h3>
+--------------------------
+<p>Before compiling DTN2 please compile Oasys-1.3.0+ (must be 
+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.
+
+<blockquote><pre>$ gunzip -c oasys-X.Y.Z.tgz | tar xvf -</pre></blockquote>
+
+<p>For the latest ("bleeding edge") version of the code see the section on <a href="#Mercurial">Mercurial</a>
+<p>Next, configure and compile oasys:
+
+<blockquote><pre>$ cd oasys (or oasys-X.Y.Z)
+$ sh configure
+$ make</pre></blockquote>
+
+<p>Support for the
+following DTN2 options should be specified when configuring
+oasys
+
+<p>specify location / support of:
+<ul>    
+<li>    Python 
+<li>    tcl                  
+<li>    google perftools
+<li>    expat
+<li>    xerces-c
+<li>    xsd tool
+<li>    Berkeley DB                  
+<li>    mysql 
+<li>    postgres             
+</ul>
+<p>compile with or without support for:
+
+<ul>
+<li>    bluetooth 
+<li>    zlib 
+<li>    tclreadline
+<li>    profiling
+<li>    google profiling
+<li>    assembly-based atomic functions
+</ul>
+<p>enable or disable:
+<ul>
+<li>    oasys debugging
+<li>    oasys memory debugging
+<li>    oasys lock debugging
+<li>    oasys optimization
+</ul>
+<a name="BSP"/>
+<h2> Installation of BSP</h2>
+--------------------------
+<p>The standard ciphersuites require, amongst other things, 
+an implementation of sha-256 message digest algorithm.
+
+<p>The DTN reference code uses OpenSSL for cryptographic
+and related functions. Unfortunately, some versions of
+OpenSSL do not include sha-256.
+
+<p>The "configure" process checks for the availability of
+sha-256 and provides an error if it is not found.
+
+<p>If your system's OpenSSL does not have sha-256 then you 
+can either upgrade it or build and use a local  version 
+of OpenSSL. OpenSSL can be obtained from
+<a href="http://www.openssl.org">openssl.org</a>
+
+<p>OpenSSL 0.9.8 version include sha-256 by default. If your
+system uses version 0.9.7 and you do not wish to upgrade
+then you can enable sha-256 in later versions of 0.9.7,
+such as 0.9.7l and 0.9.7m. To enable sha-256, specify "fips"
+when running "Configure".
+
+<p>If you wish to leave your system installation untouched and
+build against a local version, then configure dtn using
+<tt>./configure --with-bsp --with-openssl=<i>/path/to/openssl</i></tt>
+
+<p>Mac OS X note: for Mac OS X users ONLY. If you build dtn
+against a local OpenSSL using "--with-openssl=/path/to/openssl"
+you MUST also specify with it LDFLAGS="-Wl,-search_paths_first". 
+The configuration for OS X users would then be 
+<tt>./configure --with-bsp --with-openssl=<i>/path/to/openssl LDFL</i></tt>
+<p>
+
+<h2> Installation of norm</h2>
+--------------------------
+<p>Please see the norm <a href="cl-norm.html#install_norm">installation</a> instructions.
+
+<h2> On Windows </h2>
+
+<p>
+DTN2 does not yet work as a native Windows application. It might,
+however, work with the <a href="http://www.cygwin.com">Cygwin</a>
+environment.
+
+<h3> Install Cygwin </h3>
+
+<p>
+The first step is to install Cygwin on your computer. The best way to
+do this is to download <a
+href="http://cygwin.com/setup.exe">setup.exe</a> from their website.
+We suggest storing it on your computer in a new directory you make
+named <tt>c:\cygwin\download</tt>.
+
+<p>
+Start <tt>setup.exe</tt> and choose "Install from Internet". (Always
+think carefully before running an executeable you downloaded from
+the Internet, even if a nice manual like this told you to do it!
+Is your virus checker running? Is it up to date? Did the file come from the
+website you think it did?)
+Use the default root directory, <tt>c:\cygwin</tt>.
+Make the "Local Package Directory" <tt>c:\cygwin\download</tt>. Cygwin
+will ask you to choose a mirror, so choose one that is close to you on the
+Internet. It will then ask you to "Select Packages". The defaults here
+are pretty good, but you need to make a few changes:
+
+<ul>
+<li> Open Database and ensure that <b>db4.3</b>, <b>libdb4.3</b>
+and <b>libdb4.3-devel</b> are selected for installation.
+<li> Open Editors and ensure an editor you like and know how to use is
+selected.
+<li> Open Libs, and check that the <b>tcltk</b>
+and <b>sunrpc</b> packages will be installed.
+</ul>
+
+<p>
+Continue with the installation. When it is done, you'll have a working
+Cygwin installation and be ready to proceed. If you are asked to
+reboot, please do so. This ensures the correct version of Cygwin will be
+used.
+
+<h3> Compile using Cygwin </h3>
+
+<p> Once you have installed Cygwin, you'll have a new item in your
+Start -&gt; All Programs menu called Cygwin, and inside that, one
+called Bash.  When you select it, you get a <tt>bash</tt> shell, which
+is like a <tt>CMD</tt> window, only cooler. You start out in your
+home directory, which in Cygwin is <tt>/home/$user</tt>, but in
+Windows, it is <tt>c:\cygwin\home\$user</tt>. Now that you have a
+Unix-like window, follow the Unix instructions above. Cygwin comes
+with CVS, so you can even use CVS to fetch the source code, as
+described above.
+
+</body>
+</html>
+