diff options
Diffstat (limited to 'tutorial-debian9.html.j2')
-rw-r--r-- | tutorial-debian9.html.j2 | 122 |
1 files changed, 73 insertions, 49 deletions
diff --git a/tutorial-debian9.html.j2 b/tutorial-debian9.html.j2 index 4ea53d91..42583073 100644 --- a/tutorial-debian9.html.j2 +++ b/tutorial-debian9.html.j2 | |||
@@ -85,50 +85,68 @@ production version.</p> | |||
85 | </code></p> | 85 | </code></p> |
86 | 86 | ||
87 | <h4>{{ _("Option 2: GNUnet for development") }}</h4> | 87 | <h4>{{ _("Option 2: GNUnet for development") }}</h4> |
88 | <p><code> | 88 | <p> |
89 | $ cd ~/gnunet_installation/gnunet<br> | 89 | <code> |
90 | $ ./bootstrap<br> | 90 | $ cd ~/gnunet_installation/gnunet<br> |
91 | $ export GNUNET_PREFIX=/usr<br> | 91 | $ ./bootstrap<br> |
92 | $ export CFLAGS="-g -Wall -O0"<br> | 92 | $ export GNUNET_PREFIX=/usr<br> |
93 | $ ./configure --prefix=$GNUNET_PREFIX --disable-documentation --enable-logging=verbose --with-microhttpd=/opt/libmicrohttpd<br> | 93 | $ export CFLAGS="-g -Wall -O0"<br> |
94 | $ make -j$(nproc || echo -n 1)<br> | 94 | $ ./configure --prefix=$GNUNET_PREFIX --disable-documentation --enable-logging=verbose --with-microhttpd=/opt/libmicrohttpd<br> |
95 | $ sudo make install | 95 | $ make -j$(nproc || echo -n 1)<br> |
96 | </p></code> | 96 | $ sudo make install |
97 | </code> | ||
98 | </p> | ||
97 | 99 | ||
98 | <!--<h4>{{ _("Install GNUnet plugin for name resolution") }}</h4> | 100 | <!--<h4>{{ _("Install GNUnet plugin for name resolution") }}</h4> |
99 | So now it gets a bit nasty. It's not so bad. All we have to do is copy a file and edit another one. The file we need to copy is GNUnet's plugin for the Name Service Switch (NSS) in unix systems. Different unixes expect it in different locations and GNUnet's build system does not try to guess. On Debian 9 we have to do | 101 | <p> |
100 | 102 | So now it gets a bit nasty. It's not so bad. All we have to do | |
101 | <p><code> | 103 | is copy a file and edit another one. The file we need to copy |
102 | $ sudo cp /usr/lib/gnunet/nss/libnss_gns.so.2 /lib/$(uname -m)-linux-gnu/ | 104 | is GNUnet's plugin for the Name Service Switch (NSS) in unix |
103 | </p></code> | 105 | systems. Different unixes expect it in different locations and |
106 | GNUnet's build system does not try to guess. On Debian 9 we | ||
107 | have to do | ||
108 | <code> | ||
109 | $ sudo cp /usr/lib/gnunet/nss/libnss_gns.so.2 /lib/$(uname -m)-linux-gnu/ | ||
110 | </code> | ||
111 | </p> | ||
104 | 112 | ||
105 | <p>The next step is activating the GNUnet plugin we just copied in the NSS | 113 | <p> |
106 | config. It is located in `/etc/nsswitch.conf`. It should contain a line | 114 | The next step is activating the GNUnet plugin we just copied |
107 | starting with "hosts" similar to this (at least "files" and "dns" should be | 115 | in the NSS config. It is located in `/etc/nsswitch.conf`. It should |
108 | there):</p> | 116 | contain a line starting with "hosts" similar to this (at least "files" |
117 | and "dns" should be there): | ||
118 | </p> | ||
109 | 119 | ||
110 | <p><code> | 120 | <p> |
111 | $ cat /etc/nsswitch.conf<br> | 121 | <code> |
112 | hosts: files mdns4_minimal [NOTFOUND=return] dns | 122 | $ cat /etc/nsswitch.conf<br> |
113 | </p></code> | 123 | hosts: files mdns4_minimal [NOTFOUND=return] dns |
124 | </code> | ||
125 | </p> | ||
114 | 126 | ||
115 | <p><b>Attention: Once we modified `etc/nsswitch.conf` DNS resolution will only | 127 | <p> |
116 | be possible as long as is GNUnet is running. We can leave the next step out, | 128 | <b>Attention: Once we modified `etc/nsswitch.conf` DNS resolution will only |
117 | but then we will not be able to use GNUnet's name resolution in external | 129 | be possible as long as is GNUnet is running. We can leave the next step out, |
118 | applications.</b></p> | 130 | but then we will not be able to use GNUnet's name resolution in external |
131 | applications.</b> | ||
132 | </p> | ||
119 | 133 | ||
120 | <p>We save a copy of the original file and then modify the line using sed:</p> | 134 | <p>We save a copy of the original file and then modify the line using sed:</p> |
121 | 135 | ||
122 | <p><code> | 136 | <p> |
123 | $ sudo cp /etc/nsswitch.conf /etc/nsswitch.conf.original<br> | 137 | <code> |
124 | $ sudo sed -i -E 's/^(hosts:.*) dns/\1 gns [NOTFOUND=return] dns/' /etc/nsswitch.conf | 138 | $ sudo cp /etc/nsswitch.conf /etc/nsswitch.conf.original<br> |
125 | </p></code> | 139 | $ sudo sed -i -E 's/^(hosts:.*) dns/\1 gns [NOTFOUND=return] dns/' /etc/nsswitch.conf |
140 | </code> | ||
141 | </p> | ||
126 | 142 | ||
127 | <p>Now in the line starting with "hosts" should contain an entry "gns [NOTFOUND=return]" before the "dns" entry like this:</p> | 143 | <p>Now in the line starting with "hosts" should contain an entry "gns [NOTFOUND=return]" before the "dns" entry like this:</p> |
128 | 144 | ||
129 | <p><code> | 145 | <p> |
130 | hosts: files mdns4_minimal [NOTFOUND=return] gns [NOTFOUND=return] dns | 146 | <code> |
131 | </p></code> | 147 | hosts: files mdns4_minimal [NOTFOUND=return] gns [NOTFOUND=return] dns |
148 | </code> | ||
149 | </p> | ||
132 | 150 | ||
133 | <p>That's it. It wasn't that nasty, was it?</p>--> | 151 | <p>That's it. It wasn't that nasty, was it?</p>--> |
134 | 152 | ||
@@ -191,27 +209,31 @@ Congratulations! GNUnet is now installed! Before we start it we need to create a | |||
191 | 209 | ||
192 | <h3>{{ _("Make sure it works") }}</h3> | 210 | <h3>{{ _("Make sure it works") }}</h3> |
193 | 211 | ||
194 | <p>Let's try out some of GNUnet's use cases. Some should be done before others: | 212 | <p> |
195 | 213 | Let's try out some of GNUnet's use cases. Some should be done | |
196 | <ul> | 214 | before others: |
197 | <li>filesharing</li> | 215 | |
198 | <li>A simple chat using CADET</li> | 216 | <ul> |
199 | <li>Name resolution using GNS on the command line</li> | 217 | <li>filesharing</li> |
200 | <li>Name resolution using GNS with a browser (do it on the command line first)</li> | 218 | <li>A simple chat using CADET</li> |
201 | <li>Serving a website using VPN (do name resolution with a browser first)</li> | 219 | <li>Name resolution using GNS on the command line</li> |
202 | </ul> | 220 | <li>Name resolution using GNS with a browser (do it on the command line first)</li> |
203 | 221 | <li>Serving a website using VPN (do name resolution with a browser first)</li> | |
222 | </ul> | ||
204 | </p> | 223 | </p> |
205 | 224 | ||
206 | 225 | ||
207 | <h4>{{ _("filesharing") }}</h4> | 226 | <h4>{{ _("filesharing") }}</h4> |
208 | 227 | ||
209 | <p>Let's publish a file in the GNUnet filesharing network. We use the keywords | 228 | <p> |
229 | Let's publish a file in the GNUnet filesharing network. We use the keywords | ||
210 | ("commons" and "state") so other people will be able to search for the file. | 230 | ("commons" and "state") so other people will be able to search for the file. |
211 | </p> | 231 | </p> |
212 | 232 | ||
213 | <p>We can choose any file and describe it with meaningful keywords (using the | 233 | <p> |
214 | `-k` command line option).</p> | 234 | We can choose any file and describe it with meaningful keywords (using the |
235 | `-k` command line option). | ||
236 | </p> | ||
215 | 237 | ||
216 | <p> | 238 | <p> |
217 | <code> | 239 | <code> |
@@ -409,9 +431,11 @@ networks we don't want to share, we can carefully edit them out.</p> | |||
409 | <p>Once we receive such strings from our friends, we can add them like | 431 | <p>Once we receive such strings from our friends, we can add them like |
410 | this:</p> | 432 | this:</p> |
411 | 433 | ||
412 | <p><code> | 434 | <p> |
413 | gnunet-peerinfo -p <string> | 435 | <code> |
414 | </code></p> | 436 | gnunet-peerinfo -p <string> |
437 | </code> | ||
438 | </p> | ||
415 | 439 | ||
416 | <p>Now our GNUnet nodes can attempt reaching each other directly. This may | 440 | <p>Now our GNUnet nodes can attempt reaching each other directly. This may |
417 | still fail due to NAT traversal issues.</p> | 441 | still fail due to NAT traversal issues.</p> |