Tutorial: GNUnet auf Arch Linux/Pi

Welcome to this GNUnet tutorial for Arch Linux. This was also tested for the Raspberry Pi 3 image of Arch Linux. If you want to run a GNUnet node on a separte system, permanently online, with low energy consumption, this might be the thing for you. This tutorial shows you how to install, run, and operate it.

Anforderungen an Raspberry Pi 3

First you need the hardware. This tutorial works with a Raspberry Pi 3 or any Arch Linux system. The other Pi versions have not been tested, but they should work, too. To install Arch Linux on the Pi3, follow the instructions from archlinuxarm.org.

That was easy, right? Our goal now is to build GNUnet from source. So, let's install the tools for building new software.

$ sudo pacman -S base-devel

Now we can continue to install the following Arch Linux dependencies to compile GNUnet.

$ pacman -Su libmicrohttpd libgcrypt gnurl libunistring gnutls libidn libextractor openssl libltdl sqlite texinfo which gettext zlib pkg-config git miniupnpc libextractor jansson libsodium libargon2

Quellcode beschaffen

We are getting closer. Download the GNUnet source code which we will build in the next step:

$ git clone https://gnunet.org/git/gnunet.git

Now it's time to compile and install GNUnet.

$ cd gnunet
$ export GNUNET_PREFIX=/usr/local # for example, other locations possible
$ ./bootstrap # Run this to generate the configure files.
$ ./configure --prefix=$GNUNET_PREFIX # Use --help to see the various flags available to you.
$ make -j$(nproc || echo -n 1)
$ sudo make install

Congrats! GNUnet is now installed!

Zusätzlich: gnunet-gtk

For gnunet-gtk we need a few more dependencies.

$ pacman -Su gtk3 glade

$ git clone https://gnunet.org/git/gnunet-gtk.git

$ cd ../gnunet-gtk
$ ./bootstrap
$ export GNUNET_PREFIX=/usr/local # for example, other locations possible
$ ./configure --prefix=$GNUNET_PREFIX --with-gnunet=$GNUNET_PREFIX
$ make -j$(nproc || echo -n 1)
$ sudo make install

Ausführen

By default GNUnet looks in our home directory for the file ~/.config/gnunet.conf. We can start with an empty file for now:

$ touch ~/.config/gnunet.conf


Now we can start it with the commandline tool gnunet-arm (Automatic Restart Manager).

$ gnunet-arm -s

It starts the default GNUnet services. We can list them with the -I option:

$ gnunet-arm -I
Running services:
ats (gnunet-service-ats)
revocation (gnunet-service-revocation)
set (gnunet-service-set)
nat (gnunet-service-nat)
transport (gnunet-service-transport)
peerstore (gnunet-service-peerstore)
hostlist (gnunet-daemon-hostlist)
identity (gnunet-service-identity)
namecache (gnunet-service-namecache)
peerinfo (gnunet-service-peerinfo)
datastore (gnunet-service-datastore)
zonemaster (gnunet-service-zonemaster)
zonemaster-monitor (gnunet-service-zonemaster-monitor)
nse (gnunet-service-nse)
cadet (gnunet-service-cadet)
dht (gnunet-service-dht)
core (gnunet-service-core)
gns (gnunet-service-gns)
statistics (gnunet-service-statistics)
topology (gnunet-daemon-topology)
fs (gnunet-service-fs)
namestore (gnunet-service-namestore)
vpn (gnunet-service-vpn)

For stopping GNUnet again we can use the -e option.

$ gnunet-arm -e

Stell sicher, daß es funktioniert!

Please head over here: Use!