First you need the hardware. This tutorial works with a Raspberry Pi 3. The other Pi versions I haven't tested, but they should probably work, too. To install Archlinux 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 Archlinux dependencies to compile GNUnet on our Pi.
$ pacman -Su libmicrohttpd libgcrypt gnurl libunistring gnutls libidn
libextractor openssl libltdl sqlite texinfo which gettext zlib
pkg-config git miniupnpc libextractor jansson nim
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 GNUnet.
> cd gnunet
> ./bootstrap # Run this to generate the configure files.
> ./configure # Use --help to see the various flags available to you.
> make -j$(nproc || echo -n 1)
> sudo make install
Congrats! GNUnet is now installed!
By default GNUnet looks in our home directory for the file ~/.gnunet/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
For stopping GNUnet again we can use the -e option.
> gnunet-arm -e
Tue Oct 30 19:58:48 2018: connection established DSTJ (timeout in 293 s)
Tue Oct 30 19:58:48 2018: connection established A4MK (timeout in 292 s)
Tue Oct 30 19:58:48 2018: connection established 7WRD (timeout in 299 s)
Tue Oct 30 19:58:48 2018: connection established 5WBG (timeout in 299 s)
To be able to chat, we need to install and compile additional software.
> git clone https://gnunet.org/git/gnunet-nim.git
> cd gnunet-nim/examples
> nim c groupchat.nim
Fine! We can now try to enter a chat server running on another GNUnet node.
> LD_LIBRARY_PATH=/path/to/gnunetlibs ./groupchat --config=/path/to/gnunet.conf --server=YV6G9EP9K3X41BM3FJ3D29BDZR6358XNZ6KDZVV7DFW729YB0KCG --port=welcome --nick=YOURNICK
You should now see something like this:
> 2018-10-30 19:50:10 Welcome 8Q2T! participants: @
2018-10-30 19:52:53 [8Q2T] Hello GNUnet!
Here we have typed "Hello gnunet!" to standard in which is then written out to standard out after having been sent back from GNUnet.