Pārlūkot izejas kodu

update & fix install guide after install refactor

Noemi Vanyi 9 gadus atpakaļ
vecāks
revīzija
b6088dc912

+ 52
- 29
_sources/dev/install/installation.txt Parādīt failu

@@ -1,25 +1,28 @@
1 1
 Installation
2 2
 ============
3 3
 
4
-Step by step installation for Debian / Ubuntu with virtualenv.
4
+Step by step installation for Debian/Ubuntu with virtualenv.
5 5
 
6 6
 Source: https://about.okhin.fr/posts/Searx/ with some additions
7 7
 
8 8
 How to: `Setup searx in a couple of hours with a free SSL
9 9
 certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
10 10
 
11
+.. contents::
12
+   :depth: 3
13
+
11 14
 Basic installation
12 15
 ------------------
13 16
 
14 17
 For Ubuntu, be sure to have enable universe repository.
15 18
 
16
-Install packages :
19
+Install packages:
17 20
 
18 21
 .. code:: sh
19 22
 
20 23
     sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev
21 24
 
22
-Install searx :
25
+Install searx:
23 26
 
24 27
 .. code:: sh
25 28
 
@@ -28,7 +31,7 @@ Install searx :
28 31
     sudo useradd searx -d /usr/local/searx
29 32
     sudo chown searx:searx -R /usr/local/searx
30 33
 
31
-Install dependencies in a virtualenv :
34
+Install dependencies in a virtualenv:
32 35
 
33 36
 .. code:: sh
34 37
 
@@ -36,8 +39,7 @@ Install dependencies in a virtualenv :
36 39
     cd /usr/local/searx
37 40
     virtualenv searx-ve
38 41
     . ./searx-ve/bin/activate
39
-    pip install -r requirements.txt
40
-    python setup.py install
42
+    ./manage.sh update_packages
41 43
 
42 44
 Configuration
43 45
 -------------
@@ -51,7 +53,7 @@ Edit searx/settings.yml if necessary.
51 53
 Check
52 54
 -----
53 55
 
54
-Start searx :
56
+Start searx:
55 57
 
56 58
 .. code:: sh
57 59
 
@@ -59,7 +61,7 @@ Start searx :
59 61
 
60 62
 Go to http://localhost:8888
61 63
 
62
-If everything works fine, disable the debug option in settings.yml :
64
+If everything works fine, disable the debug option in settings.yml:
63 65
 
64 66
 .. code:: sh
65 67
 
@@ -73,14 +75,14 @@ twice).
73 75
 uwsgi
74 76
 -----
75 77
 
76
-Install packages :
78
+Install packages:
77 79
 
78 80
 .. code:: sh
79 81
 
80 82
     sudo apt-get install uwsgi uwsgi-plugin-python
81 83
 
82 84
 Create the configuration file /etc/uwsgi/apps-available/searx.ini with
83
-this content :
85
+this content:
84 86
 
85 87
 ::
86 88
 
@@ -111,7 +113,7 @@ this content :
111 113
     pythonpath = /usr/local/searx/
112 114
     chdir = /usr/local/searx/searx/
113 115
 
114
-Activate the uwsgi application and restart :
116
+Activate the uwsgi application and restart:
115 117
 
116 118
 .. code:: sh
117 119
 
@@ -126,7 +128,7 @@ with nginx
126 128
 ^^^^^^^^^^
127 129
 
128 130
 If nginx is not installed (uwsgi will not work with the package
129
-nginx-light) :
131
+nginx-light):
130 132
 
131 133
 .. code:: sh
132 134
 
@@ -136,7 +138,7 @@ Hosted at /
136 138
 """""""""""
137 139
 
138 140
 Create the configuration file /etc/nginx/sites-available/searx with this
139
-content :
141
+content:
140 142
 
141 143
 .. code:: nginx
142 144
 
@@ -151,7 +153,7 @@ content :
151 153
         }
152 154
     }
153 155
 
154
-Restart service :
156
+Restart service:
155 157
 
156 158
 .. code:: sh
157 159
 
@@ -159,10 +161,10 @@ Restart service :
159 161
     sudo service uwsgi restart
160 162
 
161 163
 from subdirectory URL (/searx)
162
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
164
+""""""""""""""""""""""""""""""
163 165
 
164 166
 Add this configuration in the server config file
165
-/etc/nginx/sites-available/default :
167
+/etc/nginx/sites-available/default:
166 168
 
167 169
 .. code:: nginx
168 170
 
@@ -183,7 +185,7 @@ Enable base\_url in searx/settings.yml
183 185
 
184 186
     base_url : http://your.domain.tld/searx/
185 187
 
186
-Restart service :
188
+Restart service:
187 189
 
188 190
 .. code:: sh
189 191
 
@@ -195,7 +197,7 @@ disable logs
195 197
 
196 198
 for better privacy you can disable nginx logs about searx.
197 199
 
198
-how to proceed : below ``uwsgi_pass`` in
200
+how to proceed: below ``uwsgi_pass`` in
199 201
 /etc/nginx/sites-available/default add
200 202
 
201 203
 ::
@@ -203,23 +205,23 @@ how to proceed : below ``uwsgi_pass`` in
203 205
     access_log /dev/null;
204 206
     error_log /dev/null;
205 207
 
206
-Restart service :
208
+Restart service:
207 209
 
208 210
 .. code:: sh
209 211
 
210 212
     sudo service nginx restart
211 213
 
212 214
 with apache
213
------------
215
+^^^^^^^^^^^
214 216
 
215
-Add wsgi mod :
217
+Add wsgi mod:
216 218
 
217 219
 .. code:: sh
218 220
 
219 221
     sudo apt-get install libapache2-mod-uwsgi
220 222
     sudo a2enmod uwsgi
221 223
 
222
-Add this configuration in the file /etc/apache2/apache2.conf :
224
+Add this configuration in the file /etc/apache2/apache2.conf:
223 225
 
224 226
 .. code:: apache
225 227
 
@@ -233,29 +235,29 @@ Note that if your instance of searx is not at the root, you should
233 235
 change ``<Location />`` by the location of your instance, like
234 236
 ``<Location /searx>``.
235 237
 
236
-Restart Apache :
238
+Restart Apache:
237 239
 
238 240
 .. code:: sh
239 241
 
240 242
     sudo /etc/init.d/apache2 restart
241 243
 
242 244
 disable logs
243
-------------
245
+""""""""""""
244 246
 
245 247
 For better privacy you can disable Apache logs.
246 248
 
247
-WARNING : not tested
249
+WARNING: not tested
248 250
 
249
-WARNING : you can only disable logs for the whole (virtual) server not
251
+WARNING: you can only disable logs for the whole (virtual) server not
250 252
 for a specific path.
251 253
 
252
-Go back to /etc/apache2/apache2.conf and above ``<Location />`` add :
254
+Go back to /etc/apache2/apache2.conf and above ``<Location />`` add:
253 255
 
254 256
 .. code:: apache
255 257
 
256 258
     CustomLog /dev/null combined
257 259
 
258
-Restart Apache :
260
+Restart Apache:
259 261
 
260 262
 .. code:: sh
261 263
 
@@ -272,6 +274,27 @@ How to update
272 274
     git stash
273 275
     git pull origin master
274 276
     git stash apply
275
-    pip install --upgrade -r requirements.txt
277
+    ./manage.sh update_packages
276 278
     sudo service uwsgi restart
277 279
 
280
+Docker
281
+------
282
+
283
+Make sure you have installed Docker. For instance, you can deploy searx like this:
284
+
285
+.. code:: sh
286
+
287
+    docker pull wonderfall/searx
288
+    docker run -d --name searx -p $PORT:8888 wonderfall/searx
289
+
290
+Go to http://localhost:$PORT.
291
+
292
+See https://hub.docker.com/r/wonderfall/searx/ for more informations.
293
+
294
+It's also possible to build searx from the embedded Dockerfile.
295
+
296
+.. code:: sh
297
+
298
+    git clone https://github.com/asciimoo/searx.git
299
+    cd searx
300
+    docker build -t whatever/searx .

+ 75
- 41
dev/install/installation.html Parādīt failu

@@ -24,7 +24,7 @@
24 24
     <script type="text/javascript" src="../../_static/underscore.js"></script>
25 25
     <script type="text/javascript" src="../../_static/doctools.js"></script>
26 26
     <link rel="top" title="searx 0.8.0 documentation" href="../../index.html" />
27
-    <link rel="next" title="Search API" href="../search_api.html" />
27
+    <link rel="next" title="Engine overview" href="../engine_overview.html" />
28 28
     <link rel="prev" title="How to contribute" href="../contribution_guide.html" />
29 29
    
30 30
   
@@ -40,50 +40,68 @@
40 40
           <div class="body" role="main">
41 41
             
42 42
   <div class="section" id="installation">
43
-<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
44
-<p>Step by step installation for Debian / Ubuntu with virtualenv.</p>
43
+<h1><a class="toc-backref" href="#id2">Installation</a><a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
44
+<p>Step by step installation for Debian/Ubuntu with virtualenv.</p>
45 45
 <p>Source: <a class="reference external" href="https://about.okhin.fr/posts/Searx/">https://about.okhin.fr/posts/Searx/</a> with some additions</p>
46 46
 <p>How to: <a class="reference external" href="https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/">Setup searx in a couple of hours with a free SSL
47 47
 certificate</a></p>
48
+<div class="contents topic" id="contents">
49
+<p class="topic-title first">Contents</p>
50
+<ul class="simple">
51
+<li><a class="reference internal" href="#installation" id="id2">Installation</a><ul>
52
+<li><a class="reference internal" href="#basic-installation" id="id3">Basic installation</a></li>
53
+<li><a class="reference internal" href="#configuration" id="id4">Configuration</a></li>
54
+<li><a class="reference internal" href="#check" id="id5">Check</a></li>
55
+<li><a class="reference internal" href="#uwsgi" id="id6">uwsgi</a></li>
56
+<li><a class="reference internal" href="#web-server" id="id7">Web server</a><ul>
57
+<li><a class="reference internal" href="#with-nginx" id="id8">with nginx</a></li>
58
+<li><a class="reference internal" href="#with-apache" id="id9">with apache</a></li>
59
+</ul>
60
+</li>
61
+<li><a class="reference internal" href="#how-to-update" id="id10">How to update</a></li>
62
+<li><a class="reference internal" href="#docker" id="id11">Docker</a></li>
63
+</ul>
64
+</li>
65
+</ul>
66
+</div>
48 67
 <div class="section" id="basic-installation">
49
-<h2>Basic installation<a class="headerlink" href="#basic-installation" title="Permalink to this headline">¶</a></h2>
68
+<h2><a class="toc-backref" href="#id3">Basic installation</a><a class="headerlink" href="#basic-installation" title="Permalink to this headline">¶</a></h2>
50 69
 <p>For Ubuntu, be sure to have enable universe repository.</p>
51
-<p>Install packages :</p>
70
+<p>Install packages:</p>
52 71
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev
53 72
 </pre></div>
54 73
 </div>
55
-<p>Install searx :</p>
74
+<p>Install searx:</p>
56 75
 <div class="code sh highlight-python"><div class="highlight"><pre>cd /usr/local
57 76
 sudo git clone https://github.com/asciimoo/searx.git
58 77
 sudo useradd searx -d /usr/local/searx
59 78
 sudo chown searx:searx -R /usr/local/searx
60 79
 </pre></div>
61 80
 </div>
62
-<p>Install dependencies in a virtualenv :</p>
81
+<p>Install dependencies in a virtualenv:</p>
63 82
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo -u searx -i
64 83
 cd /usr/local/searx
65 84
 virtualenv searx-ve
66 85
 . ./searx-ve/bin/activate
67
-pip install -r requirements.txt
68
-python setup.py install
86
+./manage.sh update_packages
69 87
 </pre></div>
70 88
 </div>
71 89
 </div>
72 90
 <div class="section" id="configuration">
73
-<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
91
+<h2><a class="toc-backref" href="#id4">Configuration</a><a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
74 92
 <div class="code sh highlight-python"><div class="highlight"><pre>sed -i -e &quot;s/ultrasecretkey/`openssl rand -hex 16`/g&quot; searx/settings.yml
75 93
 </pre></div>
76 94
 </div>
77 95
 <p>Edit searx/settings.yml if necessary.</p>
78 96
 </div>
79 97
 <div class="section" id="check">
80
-<h2>Check<a class="headerlink" href="#check" title="Permalink to this headline">¶</a></h2>
81
-<p>Start searx :</p>
98
+<h2><a class="toc-backref" href="#id5">Check</a><a class="headerlink" href="#check" title="Permalink to this headline">¶</a></h2>
99
+<p>Start searx:</p>
82 100
 <div class="code sh highlight-python"><div class="highlight"><pre>python searx/webapp.py
83 101
 </pre></div>
84 102
 </div>
85 103
 <p>Go to <a class="reference external" href="http://localhost:8888">http://localhost:8888</a></p>
86
-<p>If everything works fine, disable the debug option in settings.yml :</p>
104
+<p>If everything works fine, disable the debug option in settings.yml:</p>
87 105
 <div class="code sh highlight-python"><div class="highlight"><pre>sed -i -e &quot;s/debug : True/debug : False/g&quot; searx/settings.yml
88 106
 </pre></div>
89 107
 </div>
@@ -92,13 +110,13 @@ python setup.py install
92 110
 twice).</p>
93 111
 </div>
94 112
 <div class="section" id="uwsgi">
95
-<h2>uwsgi<a class="headerlink" href="#uwsgi" title="Permalink to this headline">¶</a></h2>
96
-<p>Install packages :</p>
113
+<h2><a class="toc-backref" href="#id6">uwsgi</a><a class="headerlink" href="#uwsgi" title="Permalink to this headline">¶</a></h2>
114
+<p>Install packages:</p>
97 115
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install uwsgi uwsgi-plugin-python
98 116
 </pre></div>
99 117
 </div>
100 118
 <p>Create the configuration file /etc/uwsgi/apps-available/searx.ini with
101
-this content :</p>
119
+this content:</p>
102 120
 <div class="highlight-python"><div class="highlight"><pre>[uwsgi]
103 121
 # Who will run the code
104 122
 uid = searx
@@ -127,7 +145,7 @@ pythonpath = /usr/local/searx/
127 145
 chdir = /usr/local/searx/searx/
128 146
 </pre></div>
129 147
 </div>
130
-<p>Activate the uwsgi application and restart :</p>
148
+<p>Activate the uwsgi application and restart:</p>
131 149
 <div class="code sh highlight-python"><div class="highlight"><pre>cd /etc/uwsgi/apps-enabled
132 150
 ln -s ../apps-available/searx.ini
133 151
 /etc/init.d/uwsgi restart
@@ -135,18 +153,18 @@ ln -s ../apps-available/searx.ini
135 153
 </div>
136 154
 </div>
137 155
 <div class="section" id="web-server">
138
-<h2>Web server<a class="headerlink" href="#web-server" title="Permalink to this headline">¶</a></h2>
156
+<h2><a class="toc-backref" href="#id7">Web server</a><a class="headerlink" href="#web-server" title="Permalink to this headline">¶</a></h2>
139 157
 <div class="section" id="with-nginx">
140
-<h3>with nginx<a class="headerlink" href="#with-nginx" title="Permalink to this headline">¶</a></h3>
158
+<h3><a class="toc-backref" href="#id8">with nginx</a><a class="headerlink" href="#with-nginx" title="Permalink to this headline">¶</a></h3>
141 159
 <p>If nginx is not installed (uwsgi will not work with the package
142
-nginx-light) :</p>
160
+nginx-light):</p>
143 161
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install nginx
144 162
 </pre></div>
145 163
 </div>
146 164
 <div class="section" id="hosted-at">
147 165
 <h4>Hosted at /<a class="headerlink" href="#hosted-at" title="Permalink to this headline">¶</a></h4>
148 166
 <p>Create the configuration file /etc/nginx/sites-available/searx with this
149
-content :</p>
167
+content:</p>
150 168
 <div class="code nginx highlight-python"><div class="highlight"><pre>server {
151 169
     listen 80;
152 170
     server_name searx.example.com;
@@ -159,15 +177,16 @@ content :</p>
159 177
 }
160 178
 </pre></div>
161 179
 </div>
162
-<p>Restart service :</p>
180
+<p>Restart service:</p>
163 181
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
164 182
 sudo service uwsgi restart
165 183
 </pre></div>
166 184
 </div>
185
+</div>
167 186
 <div class="section" id="from-subdirectory-url-searx">
168
-<h5>from subdirectory URL (/searx)<a class="headerlink" href="#from-subdirectory-url-searx" title="Permalink to this headline">¶</a></h5>
187
+<h4>from subdirectory URL (/searx)<a class="headerlink" href="#from-subdirectory-url-searx" title="Permalink to this headline">¶</a></h4>
169 188
 <p>Add this configuration in the server config file
170
-/etc/nginx/sites-available/default :</p>
189
+/etc/nginx/sites-available/default:</p>
171 190
 <div class="code nginx highlight-python"><div class="highlight"><pre>location = /searx { rewrite ^ /searx/; }
172 191
 location /searx {
173 192
         try_files $uri @searx;
@@ -184,37 +203,35 @@ location @searx {
184 203
 <div class="highlight-python"><div class="highlight"><pre>base_url : http://your.domain.tld/searx/
185 204
 </pre></div>
186 205
 </div>
187
-<p>Restart service :</p>
206
+<p>Restart service:</p>
188 207
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
189 208
 sudo service uwsgi restart
190 209
 </pre></div>
191 210
 </div>
192
-</div>
193 211
 <div class="section" id="disable-logs">
194 212
 <h5>disable logs<a class="headerlink" href="#disable-logs" title="Permalink to this headline">¶</a></h5>
195 213
 <p>for better privacy you can disable nginx logs about searx.</p>
196
-<p>how to proceed : below <code class="docutils literal"><span class="pre">uwsgi_pass</span></code> in
214
+<p>how to proceed: below <code class="docutils literal"><span class="pre">uwsgi_pass</span></code> in
197 215
 /etc/nginx/sites-available/default add</p>
198 216
 <div class="highlight-python"><div class="highlight"><pre><span class="n">access_log</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span><span class="p">;</span>
199 217
 <span class="n">error_log</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span><span class="p">;</span>
200 218
 </pre></div>
201 219
 </div>
202
-<p>Restart service :</p>
220
+<p>Restart service:</p>
203 221
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
204 222
 </pre></div>
205 223
 </div>
206 224
 </div>
207 225
 </div>
208 226
 </div>
209
-</div>
210 227
 <div class="section" id="with-apache">
211
-<h2>with apache<a class="headerlink" href="#with-apache" title="Permalink to this headline">¶</a></h2>
212
-<p>Add wsgi mod :</p>
228
+<h3><a class="toc-backref" href="#id9">with apache</a><a class="headerlink" href="#with-apache" title="Permalink to this headline">¶</a></h3>
229
+<p>Add wsgi mod:</p>
213 230
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install libapache2-mod-uwsgi
214 231
 sudo a2enmod uwsgi
215 232
 </pre></div>
216 233
 </div>
217
-<p>Add this configuration in the file /etc/apache2/apache2.conf :</p>
234
+<p>Add this configuration in the file /etc/apache2/apache2.conf:</p>
218 235
 <div class="code apache highlight-python"><div class="highlight"><pre>&lt;Location /&gt;
219 236
     Options FollowSymLinks Indexes
220 237
     SetHandler uwsgi-handler
@@ -225,39 +242,56 @@ sudo a2enmod uwsgi
225 242
 <p>Note that if your instance of searx is not at the root, you should
226 243
 change <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> by the location of your instance, like
227 244
 <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/searx&gt;</span></code>.</p>
228
-<p>Restart Apache :</p>
245
+<p>Restart Apache:</p>
229 246
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
230 247
 </pre></div>
231 248
 </div>
232
-</div>
233 249
 <div class="section" id="id1">
234
-<h2>disable logs<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
250
+<h4>disable logs<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h4>
235 251
 <p>For better privacy you can disable Apache logs.</p>
236
-<p>WARNING : not tested</p>
237
-<p>WARNING : you can only disable logs for the whole (virtual) server not
252
+<p>WARNING: not tested</p>
253
+<p>WARNING: you can only disable logs for the whole (virtual) server not
238 254
 for a specific path.</p>
239
-<p>Go back to /etc/apache2/apache2.conf and above <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> add :</p>
255
+<p>Go back to /etc/apache2/apache2.conf and above <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> add:</p>
240 256
 <div class="code apache highlight-python"><div class="highlight"><pre>CustomLog /dev/null combined
241 257
 </pre></div>
242 258
 </div>
243
-<p>Restart Apache :</p>
259
+<p>Restart Apache:</p>
244 260
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
245 261
 </pre></div>
246 262
 </div>
247 263
 </div>
264
+</div>
265
+</div>
248 266
 <div class="section" id="how-to-update">
249
-<h2>How to update<a class="headerlink" href="#how-to-update" title="Permalink to this headline">¶</a></h2>
267
+<h2><a class="toc-backref" href="#id10">How to update</a><a class="headerlink" href="#how-to-update" title="Permalink to this headline">¶</a></h2>
250 268
 <div class="code sh highlight-python"><div class="highlight"><pre>cd /usr/local/searx
251 269
 sudo -u searx -i
252 270
 . ./searx-ve/bin/activate
253 271
 git stash
254 272
 git pull origin master
255 273
 git stash apply
256
-pip install --upgrade -r requirements.txt
274
+./manage.sh update_packages
257 275
 sudo service uwsgi restart
258 276
 </pre></div>
259 277
 </div>
260 278
 </div>
279
+<div class="section" id="docker">
280
+<h2><a class="toc-backref" href="#id11">Docker</a><a class="headerlink" href="#docker" title="Permalink to this headline">¶</a></h2>
281
+<p>Make sure you have installed Docker. For instance, you can deploy searx like this:</p>
282
+<div class="code sh highlight-python"><div class="highlight"><pre>docker pull wonderfall/searx
283
+docker run -d --name searx -p $PORT:8888 wonderfall/searx
284
+</pre></div>
285
+</div>
286
+<p>Go to <a class="reference external" href="http://localhost:$PORT">http://localhost:$PORT</a>.</p>
287
+<p>See <a class="reference external" href="https://hub.docker.com/r/wonderfall/searx/">https://hub.docker.com/r/wonderfall/searx/</a> for more informations.</p>
288
+<p>It&#8217;s also possible to build searx from the embedded Dockerfile.</p>
289
+<div class="code sh highlight-python"><div class="highlight"><pre>git clone https://github.com/asciimoo/searx.git
290
+cd searx
291
+docker build -t whatever/searx .
292
+</pre></div>
293
+</div>
294
+</div>
261 295
 </div>
262 296
 
263 297
 

+ 52
- 29
docs/dev/install/installation.rst Parādīt failu

@@ -1,25 +1,28 @@
1 1
 Installation
2 2
 ============
3 3
 
4
-Step by step installation for Debian / Ubuntu with virtualenv.
4
+Step by step installation for Debian/Ubuntu with virtualenv.
5 5
 
6 6
 Source: https://about.okhin.fr/posts/Searx/ with some additions
7 7
 
8 8
 How to: `Setup searx in a couple of hours with a free SSL
9 9
 certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
10 10
 
11
+.. contents::
12
+   :depth: 3
13
+
11 14
 Basic installation
12 15
 ------------------
13 16
 
14 17
 For Ubuntu, be sure to have enable universe repository.
15 18
 
16
-Install packages :
19
+Install packages:
17 20
 
18 21
 .. code:: sh
19 22
 
20 23
     sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev
21 24
 
22
-Install searx :
25
+Install searx:
23 26
 
24 27
 .. code:: sh
25 28
 
@@ -28,7 +31,7 @@ Install searx :
28 31
     sudo useradd searx -d /usr/local/searx
29 32
     sudo chown searx:searx -R /usr/local/searx
30 33
 
31
-Install dependencies in a virtualenv :
34
+Install dependencies in a virtualenv:
32 35
 
33 36
 .. code:: sh
34 37
 
@@ -36,8 +39,7 @@ Install dependencies in a virtualenv :
36 39
     cd /usr/local/searx
37 40
     virtualenv searx-ve
38 41
     . ./searx-ve/bin/activate
39
-    pip install -r requirements.txt
40
-    python setup.py install
42
+    ./manage.sh update_packages
41 43
 
42 44
 Configuration
43 45
 -------------
@@ -51,7 +53,7 @@ Edit searx/settings.yml if necessary.
51 53
 Check
52 54
 -----
53 55
 
54
-Start searx :
56
+Start searx:
55 57
 
56 58
 .. code:: sh
57 59
 
@@ -59,7 +61,7 @@ Start searx :
59 61
 
60 62
 Go to http://localhost:8888
61 63
 
62
-If everything works fine, disable the debug option in settings.yml :
64
+If everything works fine, disable the debug option in settings.yml:
63 65
 
64 66
 .. code:: sh
65 67
 
@@ -73,14 +75,14 @@ twice).
73 75
 uwsgi
74 76
 -----
75 77
 
76
-Install packages :
78
+Install packages:
77 79
 
78 80
 .. code:: sh
79 81
 
80 82
     sudo apt-get install uwsgi uwsgi-plugin-python
81 83
 
82 84
 Create the configuration file /etc/uwsgi/apps-available/searx.ini with
83
-this content :
85
+this content:
84 86
 
85 87
 ::
86 88
 
@@ -111,7 +113,7 @@ this content :
111 113
     pythonpath = /usr/local/searx/
112 114
     chdir = /usr/local/searx/searx/
113 115
 
114
-Activate the uwsgi application and restart :
116
+Activate the uwsgi application and restart:
115 117
 
116 118
 .. code:: sh
117 119
 
@@ -126,7 +128,7 @@ with nginx
126 128
 ^^^^^^^^^^
127 129
 
128 130
 If nginx is not installed (uwsgi will not work with the package
129
-nginx-light) :
131
+nginx-light):
130 132
 
131 133
 .. code:: sh
132 134
 
@@ -136,7 +138,7 @@ Hosted at /
136 138
 """""""""""
137 139
 
138 140
 Create the configuration file /etc/nginx/sites-available/searx with this
139
-content :
141
+content:
140 142
 
141 143
 .. code:: nginx
142 144
 
@@ -151,7 +153,7 @@ content :
151 153
         }
152 154
     }
153 155
 
154
-Restart service :
156
+Restart service:
155 157
 
156 158
 .. code:: sh
157 159
 
@@ -159,10 +161,10 @@ Restart service :
159 161
     sudo service uwsgi restart
160 162
 
161 163
 from subdirectory URL (/searx)
162
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
164
+""""""""""""""""""""""""""""""
163 165
 
164 166
 Add this configuration in the server config file
165
-/etc/nginx/sites-available/default :
167
+/etc/nginx/sites-available/default:
166 168
 
167 169
 .. code:: nginx
168 170
 
@@ -183,7 +185,7 @@ Enable base\_url in searx/settings.yml
183 185
 
184 186
     base_url : http://your.domain.tld/searx/
185 187
 
186
-Restart service :
188
+Restart service:
187 189
 
188 190
 .. code:: sh
189 191
 
@@ -195,7 +197,7 @@ disable logs
195 197
 
196 198
 for better privacy you can disable nginx logs about searx.
197 199
 
198
-how to proceed : below ``uwsgi_pass`` in
200
+how to proceed: below ``uwsgi_pass`` in
199 201
 /etc/nginx/sites-available/default add
200 202
 
201 203
 ::
@@ -203,23 +205,23 @@ how to proceed : below ``uwsgi_pass`` in
203 205
     access_log /dev/null;
204 206
     error_log /dev/null;
205 207
 
206
-Restart service :
208
+Restart service:
207 209
 
208 210
 .. code:: sh
209 211
 
210 212
     sudo service nginx restart
211 213
 
212 214
 with apache
213
------------
215
+^^^^^^^^^^^
214 216
 
215
-Add wsgi mod :
217
+Add wsgi mod:
216 218
 
217 219
 .. code:: sh
218 220
 
219 221
     sudo apt-get install libapache2-mod-uwsgi
220 222
     sudo a2enmod uwsgi
221 223
 
222
-Add this configuration in the file /etc/apache2/apache2.conf :
224
+Add this configuration in the file /etc/apache2/apache2.conf:
223 225
 
224 226
 .. code:: apache
225 227
 
@@ -233,29 +235,29 @@ Note that if your instance of searx is not at the root, you should
233 235
 change ``<Location />`` by the location of your instance, like
234 236
 ``<Location /searx>``.
235 237
 
236
-Restart Apache :
238
+Restart Apache:
237 239
 
238 240
 .. code:: sh
239 241
 
240 242
     sudo /etc/init.d/apache2 restart
241 243
 
242 244
 disable logs
243
-------------
245
+""""""""""""
244 246
 
245 247
 For better privacy you can disable Apache logs.
246 248
 
247
-WARNING : not tested
249
+WARNING: not tested
248 250
 
249
-WARNING : you can only disable logs for the whole (virtual) server not
251
+WARNING: you can only disable logs for the whole (virtual) server not
250 252
 for a specific path.
251 253
 
252
-Go back to /etc/apache2/apache2.conf and above ``<Location />`` add :
254
+Go back to /etc/apache2/apache2.conf and above ``<Location />`` add:
253 255
 
254 256
 .. code:: apache
255 257
 
256 258
     CustomLog /dev/null combined
257 259
 
258
-Restart Apache :
260
+Restart Apache:
259 261
 
260 262
 .. code:: sh
261 263
 
@@ -272,6 +274,27 @@ How to update
272 274
     git stash
273 275
     git pull origin master
274 276
     git stash apply
275
-    pip install --upgrade -r requirements.txt
277
+    ./manage.sh update_packages
276 278
     sudo service uwsgi restart
277 279
 
280
+Docker
281
+------
282
+
283
+Make sure you have installed Docker. For instance, you can deploy searx like this:
284
+
285
+.. code:: sh
286
+
287
+    docker pull wonderfall/searx
288
+    docker run -d --name searx -p $PORT:8888 wonderfall/searx
289
+
290
+Go to http://localhost:$PORT.
291
+
292
+See https://hub.docker.com/r/wonderfall/searx/ for more informations.
293
+
294
+It's also possible to build searx from the embedded Dockerfile.
295
+
296
+.. code:: sh
297
+
298
+    git clone https://github.com/asciimoo/searx.git
299
+    cd searx
300
+    docker build -t whatever/searx .