aboutsummaryrefslogtreecommitdiff
path: root/template/tutorial-macos.html.j2
blob: fd86c7507a757fef935b76d3329d5139efd377fd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
{% extends "common/base.j2" %}
{% block body_content %}
<div class="container">

  <h2>{{ _("Tutorial: GNUnet on macOS 10.14 (Mojave)") }}</h2>

  <h3>{{ _("Introduction") }}</h3>

  <p>
    Welcome to the hopefully painless GNUnet tutorial for macOS Mojave! It provides
    concrete instructions on how to install a current
    version of GNUnet. The goal is to support newcomers, either end users or
    developers, who want to get in touch with GNUnet for the first time. After
    installing GNUnet we will make sure that out new GNUnet installation is working
    correctly.
  </p>

  <h3>{{ _("Installation through homebrew") }}</h3>


  <h4>{{ _("Requirements") }}</h4>

  <p>
    First, install <a href="https://brew.sh">homebrew</a> and <a href="https://developer.apple.com/xcode/">XCode</a>.
    GNUnet is not yet in the official homebrew repos (we are working on it).
    So, you need to grab the formula from <a href="https://git.gnunet.org/gnunet.git/tree/contrib/gnunet.rb">here</a>
    and put it under the homebrew formula folder:
  </p><
  <code>
    $ cp gnunet.rb $(brew --repo homebrew/core)/Formula
  </code>

  <p>
    Then install:
  </p>

  <code>
    $ brew install gnunet
  </code>

  <p> If you want to install GNUnet from git, execute:</p>

  <code>
    $ brew install --HEAD gnunet
  </code>

  <h3>{{ _("Installation from source") }}</h3>

  <p>
    The following instructions are only really interesting for developers
    or if you need special build switches as you can install from git
    using homebrew (see above).<br/>
    First, install the dependencies:
  </p>

  <code>
    $ brew install git autoconf automake glpk gettext gnutls jansson libextractor libgcrypt libffi libidn2 libmicrohttpd libmpc libtool libunistring pkg-config unbound
  </code>

  <p>
    Next, create a directory in your. This directory is where we store
    the source code later. You should keep this directory after
    installation because it contains Makefiles that can be used for
    uninstalling GNUnet again (see chapter *Uninstall GNUnet and its
    dependencies*).
  </p>

  <code>
    $ mkdir ~/gnunet
  </code>

  <h4>{{ _("Get the source code") }}</h4>

  <code>
    $ cd ~<br>
    $ git clone --depth 1 https://gnunet.org/git/gnunet.git gnunet_src<br>
  </code>

  <h4>{{ _("Compile and Install") }}</h4>


  <p>
    You have a choice between two options:
    build the *production version* or *development version*. If
    you want to start writing GNUnet applications or join the GNUnet development
    choose the development version (it will print more debug output and contains
    debug symbols that can be displayed with a debugger). Otherwise choose the
    production version.
  </p>
  
  <h5>{{ _("Option 1: GNUnet for production / usage") }}</h5>

  <code>
  $ cd ~/gnunet_src<br>
  $ ./bootstrap<br>
  $ export GNUNET_PREFIX=~/gnunet<br>
  $ ./configure --prefix=$GNUNET_PREFIX --disable-documentation<br>
  </code>
  <p>
  You might see configure failing telling you that it ``cannot run C compiled programs.''.
  In this case, you might need to open/run Xcode once and you will be prompted to
  install additonal packages.
  Then, you might have to manually install the command line tools from here https://developer.apple.com/download/more/ (you need an Apple ID for this).
  Install those and execute
  </p>
  <code>
  $ open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
  </code>
  <p>
    After configure passes, you need to add a 'gnunetdns' group using the macOS system preferences.
  Further, you need to add a user 'gnunet'. Then:
  </p>
  <code>
  $ make<br>
  $ sudo make install
  </code>

  <h5>{{ _("Option 2: GNUnet experimental") }}</h5>

  <p>
  Perform the same steps as for Option 1, but add the configure flat '--enable-experimental'
  </p>
  <h4>{{ _("Install GNUnet plugin for name resolution") }}</h4>

  <p>
  Congratulations! GNUnet is now installed! Before we start it we
  need to create a configuration file. By default GNUnet looks in
  our home directory for the file `~/.gnunet/gnunet.conf`. We can
  start with an empty file for now:
  </p>

  <code>
  $ touch ~/.config/gnunet.conf
  </code>

  <p>
  Now we can start it with the command line tool
  `gnunet-arm` (Automatic Restart Manager).
  </p>

  <code>
  $ gnunet-arm -s
  </code>

  <p>
  It starts the default GNUnet services. We can list them with the
  `-I` option:
  </p>

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

  <p>
  For stopping GNUnet again we can use the `-e` option.
  </p>

  <code>
  $ gnunet-arm -e
  </code>


  <h3>{{ _("Further information") }}</h3>

  <p>GNUnet has a number of services and features.
  Please check <a href="https://docs.gnunnet.org">our documentation</a>
  to learn how to use them. If you find anything odd or bugs, please
  <a href="https://gnunet.org/bugs">let us know</a>.
  </p>

      </div>
{% endblock body_content %}