diff options
Diffstat (limited to 'template/install-on-openwrt.html.j2')
-rw-r--r-- | template/install-on-openwrt.html.j2 | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/template/install-on-openwrt.html.j2 b/template/install-on-openwrt.html.j2 new file mode 100644 index 00000000..b49104a9 --- /dev/null +++ b/template/install-on-openwrt.html.j2 | |||
@@ -0,0 +1,117 @@ | |||
1 | {% extends "common/base.j2" %} | ||
2 | {% block body_content %} | ||
3 | <article class="container"> | ||
4 | |||
5 | <header> | ||
6 | <h1>{{ _("Tutorial: GNUnet on OpenWrt") }}</h1> | ||
7 | </header> | ||
8 | |||
9 | Welcome to this GNUnet tutorial for <a href="https://www.openwrt.org">OpenWrt</a>. | ||
10 | |||
11 | Running on OpenWrt allows having a GNUnet node on embedded Linux systems or | ||
12 | inside a very tiny virtual machine. This tutorial shows you how to | ||
13 | install, run, and operate it. | ||
14 | |||
15 | <h2>{{ _("Installation") }}</h2> | ||
16 | |||
17 | <p>To run GNUnet in meaningful way, you will need a system with at least 16MB | ||
18 | of flash storage and at least 64MB of RAM (128MB of more recommended).</p> | ||
19 | |||
20 | <p>OpenWrt ships with up-to-date packages GNUnet, so you can install it right | ||
21 | from the OpenWrt packages repository without having to build things | ||
22 | yourself.</p> | ||
23 | <p>GNUnet has been split into a high number of small packages, allowing to select | ||
24 | anything between the most simple setup supporting GNS and gnunet-vpn: | ||
25 | <p><code> | ||
26 | root@OpenWrt:/# opkg update<br/> | ||
27 | ...<br/> | ||
28 | root@OpenWrt:/# opkg install gnunet gnunet-gns-flat gnunet-peerstore-flat gnunet-vpn gnunet-transport-tcp gnunet-transport-http_client | ||
29 | </code></p> | ||
30 | <p>...and a full blown GNUnet node for filesharing:</p> | ||
31 | <p>First of all, setup an external (USB, ...) storage volume to contain GNUnet's databases, see <a href="https://openwrt.org/docs/guide-user/storage/fstab">OpenWrt's user guide: Fstab Configuration</a>.<br/>Then install PostgreSQL:</p> | ||
32 | <p><code> | ||
33 | root@OpenWrt:/# opkg update<br/> | ||
34 | ...<br/> | ||
35 | root@OpenWrt:/# opkg install pgsql-server pgsql-cli<br/> | ||
36 | ... | ||
37 | </code></p> | ||
38 | <p>Now configure PGDATA directory in /etc/config/postgresql to be located on your external storage volume. When restarting the postgresql init.d service you should see the new database directory being initialized.<br/>Then install GNUnet itself:</p> | ||
39 | <p><code> | ||
40 | root@OpenWrt:/# opkg install gnunet gnunet-dhtcache-pgsql gnunet-fs-pgsql gnunet-gns-pgsql gnunet-peerstore-flat gnunet-vpn gnunet-transport-tcp gnunet-transport-http_client | ||
41 | </code></p> | ||
42 | |||
43 | <p>Congrats! GNUnet is now installed!</p> | ||
44 | |||
45 | <p>Alternatively you can also use the OpenWrt ImageBuilder to generate ready-made images with those packages pre-installed.</p> | ||
46 | |||
47 | <h2>{{ _("Configuration") }}</h2> | ||
48 | |||
49 | <p>GNUnet's configuration is contained in OpenWrt's UCI by a simple translation | ||
50 | mechanism overlaying options set in UCI on GNUnet's default configuration.<br/> | ||
51 | In this way, only the options changed by the user are persistent in UCI. | ||
52 | Example:</p> | ||
53 | <p><code> | ||
54 | root@OpenWrt:/# uci show gnunet<br/> | ||
55 | gnunet.nse=gnunet-config<br/> | ||
56 | gnunet.nse.WORKDELAY='500 ms'<br/> | ||
57 | gnunet.dhtcache=gnunet-config<br/> | ||
58 | gnunet.dhtcache.DATABASE='postgres'<br/> | ||
59 | gnunet.datastore=gnunet-config<br/> | ||
60 | gnunet.datastore.DATABASE='postgres'<br/> | ||
61 | gnunet.namestore=gnunet-config<br/> | ||
62 | gnunet.namestore.DATABASE='postgres'<br/> | ||
63 | gnunet.namecache=gnunet-config<br/> | ||
64 | gnunet.namecache.DATABASE='postgres'<br/> | ||
65 | gnunet.peerstore=gnunet-config<br/> | ||
66 | gnunet.peerstore.DATABASE='flat'<br/> | ||
67 | gnunet.peerstore_flat=gnunet-config<br/> | ||
68 | gnunet.peerstore_flat.FILENAME='/etc/gnunet/peerstore.flat'<br/> | ||
69 | gnunet.psycstore=gnunet-config<br/> | ||
70 | gnunet.psycstore.DATABASE='postgres'<br/> | ||
71 | <br/> | ||
72 | root@OpenWrt:/# uci set gnunet.peerstore_flat.FILENAME='/mnt/sda1/gnunet/peerstore.flat'<br/> | ||
73 | root@OpenWrt:/# uci commit gnunet<br/> | ||
74 | </code></p> | ||
75 | |||
76 | <h2>{{ _("Use") }}</h2> | ||
77 | |||
78 | <p>OpenWrt's procd runs the gnunet-arm service manager which then runs GNUnet services. We can list them with the -I option:</p> | ||
79 | |||
80 | <p><code> | ||
81 | root@OpenWrt:/etc# gnunet-arm -I<br/> | ||
82 | Services (excluding stopped services):<br/> | ||
83 | (started: 24 / stopped: 14 / finished: 1)<br/> | ||
84 | ats (binary='gnunet-service-ats', status=started)<br/> | ||
85 | cadet (binary='gnunet-service-cadet', status=started)<br/> | ||
86 | core (binary='gnunet-service-core', status=started)<br/> | ||
87 | datastore (binary='gnunet-service-datastore', status=started)<br/> | ||
88 | dht (binary='gnunet-service-dht', status=started)<br/> | ||
89 | fs (binary='gnunet-service-fs', status=started)<br/> | ||
90 | gns (binary='gnunet-service-gns', status=started)<br/> | ||
91 | hostlist (binary='gnunet-daemon-hostlist', status=started)<br/> | ||
92 | namecache (binary='gnunet-service-namecache', status=started)<br/> | ||
93 | namestore (binary='gnunet-service-namestore', status=started)<br/> | ||
94 | nat (binary='gnunet-service-nat', status=started)<br/> | ||
95 | nse (binary='gnunet-service-nse', status=started)<br/> | ||
96 | peerinfo (binary='gnunet-service-peerinfo', status=started)<br/> | ||
97 | peerstore (binary='gnunet-service-peerstore', status=started)<br/> | ||
98 | resolver (binary='gnunet-service-resolver', status=started)<br/> | ||
99 | rest (binary='gnunet-rest-server', status=started)<br/> | ||
100 | revocation (binary='gnunet-service-revocation', status=started)<br/> | ||
101 | rps (binary='gnunet-service-rps', status=started)<br/> | ||
102 | set (binary='gnunet-service-set', status=started)<br/> | ||
103 | statistics (binary='gnunet-service-statistics', status=started)<br/> | ||
104 | topology (binary='gnunet-daemon-topology', status=started)<br/> | ||
105 | transport (binary='gnunet-service-transport', status=started)<br/> | ||
106 | vpn (binary='gnunet-service-vpn', status=started)<br/> | ||
107 | zonemaster (binary='gnunet-service-zonemaster', status=started)<br/> | ||
108 | zonemaster-monitor (binary='gnunet-service-zonemaster-monitor', status=finished)<br/> | ||
109 | </code></p> | ||
110 | |||
111 | <h2>{{ _("Make sure, it works!") }}</h2> | ||
112 | <p> | ||
113 | Please head over here: <a href="https://gnunet.org/en/use.html">Use!</a> | ||
114 | <p> | ||
115 | |||
116 | </article> | ||
117 | {% endblock body_content %} | ||