[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 01/02: add Installation chapter
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 01/02: add Installation chapter |
Date: |
Thu, 28 Jun 2018 01:32:29 +0200 |
This is an automated email from the git hooks/post-receive script.
lurchi pushed a commit to branch master
in repository gnunet.
commit fbf7f994ac4a5a509857c9bd267909d1cffc600c
Author: lurchi <address@hidden>
AuthorDate: Thu Jun 28 01:22:01 2018 +0200
add Installation chapter
---
doc/documentation/Makefile.am | 1 +
doc/documentation/chapters/installation.texi | 158 +++++++++++++++++++++++++++
doc/documentation/gnunet.texi | 7 ++
3 files changed, 166 insertions(+)
diff --git a/doc/documentation/Makefile.am b/doc/documentation/Makefile.am
index 12f40f147..0ee81304e 100644
--- a/doc/documentation/Makefile.am
+++ b/doc/documentation/Makefile.am
@@ -114,6 +114,7 @@ gnunet_TEXINFOS =
\
chapters/developer.texi \
chapters/preface.texi \
chapters/philosophy.texi \
+ chapters/installation.texi \
chapters/user.texi \
chapters/vocabulary.texi \
chapters/configuration.texi \
diff --git a/doc/documentation/chapters/installation.texi
b/doc/documentation/chapters/installation.texi
new file mode 100644
index 000000000..d66d72ae5
--- /dev/null
+++ b/doc/documentation/chapters/installation.texi
@@ -0,0 +1,158 @@
address@hidden Installing GNUnet
address@hidden Installing GNUnet
+
+This guide is intended for those who want to install Gnunet from source. For
instructions on how to install GNUnet as a binary package please refer to the
official documentation of your operating system or package manager.
+
address@hidden Getting the Source Code
address@hidden Installing dependencies
+GNUnet needs few libraries and applications for being able to run and another
few optional ones for using certain features. Preferably they should be
installed with a package manager. Just in case we include a link to the project
websites.
+
+The mandatory libraries and applications are
address@hidden @bullet
address@hidden libtool
address@hidden autoconf >= version 2.59
address@hidden automake >= version 1.11.1
address@hidden pkg-config
address@hidden libgcrypt >= version 1.6
address@hidden libextractor
address@hidden libidn
address@hidden libmicrohttpd >= version 0.9.52
address@hidden libnss
address@hidden libunistring
address@hidden gettext
address@hidden glibc
address@hidden libgmp
address@hidden gnutls
address@hidden libcurl (has to be linked to GnuTLS) or libgnurl
address@hidden zlib
address@hidden itemize
+
+In addition GNUnet needs one of of these three databases
address@hidden @bullet
address@hidden sqlite + libsqlite (the default, requires no further
configuration)
address@hidden postgres + libpq
address@hidden mysql + libmysqlclient
address@hidden itemize
+
+These are the dependencies only required for certain features
address@hidden @bullet
address@hidden Texinfo (for building the documentation)
address@hidden Texlive (for building the documentation)
address@hidden miniupnpc (for traversing NAT boxes more reliably)
address@hidden libopus (for running the GNUnet conversation telephony
application)
address@hidden libpulse (for running the GNUnet conversation telephony
application)
address@hidden libogg (for running the GNUnet conversation telephony
application)
address@hidden bluez (for bluetooth support)
address@hidden libpbc (for attribute-based encryption and the identity provider
subsystem)
address@hidden libgabe (for attribute-based encryption and the identity
provider subsystem)
address@hidden itemize
+
+
address@hidden Getting the Source Code
+You can either download the source code using git (you obviously need git
installed) or as an archive.
+
+Using git type
address@hidden
+git clone https://gnunet.org/git/gnunet.git
address@hidden example
+
+The archive can be found at @uref{https://gnunet.org/downloads}. Extract it
using a graphical archive tool or @code{tar}:
address@hidden
+tar xzvf gnunet-0.11.0pre66.tar.gz
address@hidden example
+
+In the next chapter we will assume that the source code is available in the
home directory at @code{~/gnunet}.
+
address@hidden Create @code{gnunet} user and group
+The GNUnet services should be run as a dedicated user called @code{gnunet}.
For using them a user should be in the same group as this system user.
+
+Create user @code{gnunet} who is member of the group @code{gnunet} and specify
a home directory where the GNUnet services will store persistant data such as
information about peers.
address@hidden
+$ sudo useradd --system --groups gnunet --home-dir /var/lib/gnunet
address@hidden example
+
+Now add your own user to the @code{gnunet} group.
address@hidden
+$ sudo adduser alice gnunet
address@hidden example
+
address@hidden Preparing and Compiling the Source Code
+For preparing the source code for compilation a bootstrap script and
@code{configure} has to be run from the source code directory. When running
@code{configure} the following options can be specified to customize the
compilation and installation process:
+
address@hidden @bullet
address@hidden @code{--disable-documentation} - don't build the configuration
documents
address@hidden @code{--enable-looging=[LOGLEVEL]} - choose a loglevel
(@code{debug}, @code{info}, @code{warning} or @code{error})
address@hidden @code{--prefix=[PATH]} - the directory where the GNUnet
libraries and binaries will be installed
address@hidden @code{--with-extractor=[PATH]} - the path to libextractor
address@hidden @code{--with-libidn=[PATH]} - the path to libidn
address@hidden @code{--with-microhttpd=[PATH]} - the path to libmicrohttpd
address@hidden @code{--with-sqlite=[PATH]} - the path to libsqlite
address@hidden @code{--with-zlib=[PATH]} - the path to zlib
address@hidden @code{--with-sudo=[PATH]} - path to the sudo binary (no need to
run @code{make install} as root if specified)
address@hidden itemize
+
+The following example configures the installation prefix @code{/usr/lib} and
disables building the documentation
address@hidden
+$ cd ~/gnunet
+$ ./bootstrap
+$ configure --prefix=/usr/lib --disable-configuration
address@hidden example
+
+After running the bootstrap script and @code{configure} successfully the
source code can be compiled with make. Here @code{-j5} specifies that 5 threads
should be used.
address@hidden
+$ make -j5
address@hidden example
+
+
address@hidden Installation
+The compiled binaries can be installed using @code{make install}. It needs to
be run as root (or with sudo) because some binaries need the @code{suid} bit
set. Without that some GNUnet subsystems (such as VPN) will not work.
+
address@hidden
+$ sudo make install
address@hidden example
+
+One important library is the GNS plugin for NSS (the name services switch)
which allows using GNS (the GNU name system) in the normal DNS resolution
process. Unfortunately NSS expects it in a specific location (probably
@code{/lib}) which may differ from the installation prefix (see @code{--prefix}
option in the previous section). This is why the pugin has to be installed
manually.
+
+Find the directory where nss plugins are installed on your system, e.g.
+
address@hidden
+$ ls -l /lib/libnss_*
+/lib/libnss_mymachines.so.2
+/lib/libnss_resolve.so.2
+/lib/libnss_myhostname.so.2
+/lib/libnss_systemd.so.2
address@hidden example
+
+Copy the GNS NSS plugin to that directory:
+
address@hidden
+cp ~/gnunet/src/gns/nss/libnss_gns.so.2 /lib
address@hidden example
+
+Now, to activate the plugin, you need to edit your @code{/etc/nsswitch.conf}
where you should find a line like this:
+
address@hidden
+hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
address@hidden example
+
+The exact details may differ a bit, which is fine. Add the text @code{"gns
[NOTFOUND=return]"} after @code{"files"}.
+
address@hidden
+hosts: files gns [NOTFOUND=return] mdns4_minimal [NOTFOUND=return] dns mdns4
address@hidden example
+
+Optionally, if GNS shall be used with a browser, execute the GNS CA-setup
script. It will isetup the GNS Certificate Authority with the user's browser.
address@hidden
+$ gnunet-gns-proxy-setup-ca
address@hidden example
+
+Finally install a configuration file in @code{~/.gnunet/gnunet.conf}. Below
you find an example config which allows you to start GNUnet.
+
address@hidden
+[arm]
+SYSTEM_ONLY = NO
+USER_ONLY = NO
+
+[transport]
+PLUGINS = tcp
address@hidden example
diff --git a/doc/documentation/gnunet.texi b/doc/documentation/gnunet.texi
index cd2f04399..0d539a9d7 100644
--- a/doc/documentation/gnunet.texi
+++ b/doc/documentation/gnunet.texi
@@ -83,6 +83,7 @@ This document is the Reference Manual for GNUnet version
@value{VERSION}.
* Preface:: Chapter 0
* Philosophy:: About GNUnet
@c * Vocabulary:: Vocabulary
+* Installing GNUnet:: Installing GNUnet
* Using GNUnet:: Using GNUnet
@c * Configuration Handbook:: Configuring GNUnet
* GNUnet Contributors Handbook:: Contributing to GNUnet
@@ -120,6 +121,8 @@ Philosophy
* Backup of Identities and Egos::
* Revocation::
+Installing GNUnet
+
Using GNUnet
* Checking the Installation::
@@ -193,6 +196,10 @@ GNUnet Developer Handbook
@c *********************************************************************
@c *********************************************************************
address@hidden chapters/installation.texi
address@hidden
*********************************************************************
+
address@hidden
*********************************************************************
@include chapters/user.texi
@c *********************************************************************
--
To stop receiving notification emails like this one, please contact
address@hidden