aboutsummaryrefslogtreecommitdiff
path: root/template/tutorial-archpi.html.j2
diff options
context:
space:
mode:
Diffstat (limited to 'template/tutorial-archpi.html.j2')
-rw-r--r--template/tutorial-archpi.html.j2150
1 files changed, 150 insertions, 0 deletions
diff --git a/template/tutorial-archpi.html.j2 b/template/tutorial-archpi.html.j2
new file mode 100644
index 00000000..893a7de8
--- /dev/null
+++ b/template/tutorial-archpi.html.j2
@@ -0,0 +1,150 @@
1{% extends "common/base.j2" %}
2{% block body_content %}
3<div class="container">
4
5<h2>{{ _("Tutorial: GNUnet on Archlinux/Pi") }}</h2>
6
7Welcome to this GNUnet tutorial for Archlinux on a Raspberry Pi 3. If you want
8to run a GNUnet node on a separte system, permanently online, with low energy
9consumption, this might be the thing for you. This tutorial shows you how to
10install, run, and operate it.
11
12<h3>{{ _("Requirements") }}</h3>
13
14<p>First you need the hardware. This tutorial works with a Raspberry Pi 3. The
15other Pi versions I haven't tested, but they should probably work, too. To
16install Archlinux on the Pi3, follow the instructions from <a
17href="https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3">archlinuxarm.org</a>.</p>
18
19<p>That was easy, right? Our goal now is to build GNUnet from source. So, let's
20install the tools for building new software.</p>
21
22<p><code>
23> sudo pacman -S base-devel
24</code></p>
25
26<p>Now we can continue to install the following Archlinux dependencies to
27compile GNUnet on our Pi.</p>
28
29<p><code>
30$ pacman -Su libmicrohttpd libgcrypt gnurl libunistring gnutls libidn
31libextractor openssl libltdl sqlite texinfo which gettext zlib
32pkg-config git miniupnpc libextractor jansson nim
33</code></p>
34
35<h3>{{ _("Get the Source Code") }}</h3>
36
37<p>We are getting closer. Download the GNUnet source code which we will build
38in the next step:<p>
39
40<p><code>
41> git clone https://gnunet.org/git/gnunet.git<br>
42</code></p>
43
44<p>Now it's time to compile GNUnet.</p>
45
46<p><code>
47> cd gnunet<br>
48> ./bootstrap # Run this to generate the configure files.<br>
49> ./configure # Use --help to see the various flags available to you.<br>
50> make -j$(nproc || echo -n 1)<br>
51> sudo make install<br>
52</code></p>
53
54<p>Congrats! GNUnet is now installed!</p>
55
56<h3>{{ _("Run") }}</h3>
57
58<p>By default GNUnet looks in our home directory for the file
59~/.gnunet/gnunet.conf. We can start with an empty file for now:</p>
60
61<p><code>
62> touch ~/.config/gnunet.conf
63</code></p>
64
65<p>Now we can start it with the commandline tool gnunet-arm (Automatic Restart
66Manager).</p>
67
68<p><code>
69> gnunet-arm -s
70</code></p>
71
72<p>It starts the default GNUnet services. We can list them with the -I option:</p>
73
74<p><code>
75> gnunet-arm -I<br>
76Running services:<br>
77ats (gnunet-service-ats)<br>
78revocation (gnunet-service-revocation)<br>
79set (gnunet-service-set)<br>
80nat (gnunet-service-nat)<br>
81transport (gnunet-service-transport)<br>
82peerstore (gnunet-service-peerstore)<br>
83hostlist (gnunet-daemon-hostlist)<br>
84identity (gnunet-service-identity)<br>
85namecache (gnunet-service-namecache)<br>
86peerinfo (gnunet-service-peerinfo)<br>
87datastore (gnunet-service-datastore)<br>
88zonemaster (gnunet-service-zonemaster)<br>
89zonemaster-monitor (gnunet-service-zonemaster-monitor)<br>
90nse (gnunet-service-nse)<br>
91cadet (gnunet-service-cadet)<br>
92dht (gnunet-service-dht)<br>
93core (gnunet-service-core)<br>
94gns (gnunet-service-gns)<br>
95statistics (gnunet-service-statistics)<br>
96topology (gnunet-daemon-topology)<br>
97fs (gnunet-service-fs)<br>
98namestore (gnunet-service-namestore)<br>
99vpn (gnunet-service-vpn)<br>
100</code></p>
101
102<p>For stopping GNUnet again we can use the -e option.</p>
103
104<p><code>
105> gnunet-arm -e
106</code></p>
107
108<h3>{{ _("Make sure, it works!") }}</h3>
109
110After starting GNUnet you should make sure that your peer is connecting to the
111P2P-network. By typing gnunet-core you should see something like this:
112
113<p><code>
114> gnunet-core<br>
115Tue Oct 30 19:58:48 2018: connection established DSTJ (timeout in 293 s)<br>
116Tue Oct 30 19:58:48 2018: connection established A4MK (timeout in 292 s)<br>
117Tue Oct 30 19:58:48 2018: connection established 7WRD (timeout in 299 s)<br>
118Tue Oct 30 19:58:48 2018: connection established 5WBG (timeout in 299 s)<br>
119</code></p>
120
121<h3>{{ _("Chat the cat") }}</h3>
122
123<p>To be able to chat, we need to install and compile additional
124software.</p>
125
126<p><code>
127> git clone https://gnunet.org/git/gnunet-nim.git<br>
128> cd gnunet-nim/examples<br>
129> nim c groupchat.nim
130</code></p>
131
132<p>Fine! We can now try to enter a chat server running on another GNUnet node.
133
134<p><code>
135> LD_LIBRARY_PATH=/path/to/gnunetlibs ./groupchat --config=/path/to/gnunet.conf --server=YV6G9EP9K3X41BM3FJ3D29BDZR6358XNZ6KDZVV7DFW729YB0KCG --port=welcome --nick=YOURNICK
136</code></p>
137
138<p>You should now see something like this:</p>
139
140<p><code>
141> 2018-10-30 19:50:10 Welcome 8Q2T! participants: @[] <br>
142Hello GNUnet!<br>
1432018-10-30 19:52:53 [8Q2T] Hello GNUnet!
144</code></p>
145
146<p>Here we have typed "Hello gnunet!" to standard in which is then written out
147to standard out after having been sent back from GNUnet.</p>
148
149</div>
150{% endblock body_content %}