Browse Source

Merge pull request #490 from kvch/gh-pages

update & fix install guide after install refactor
Adam Tauber 9 years ago
parent
commit
1a8a35b10e
3 changed files with 179 additions and 99 deletions
  1. 52
    29
      _sources/dev/install/installation.txt
  2. 75
    41
      dev/install/installation.html
  3. 52
    29
      docs/dev/install/installation.rst

+ 52
- 29
_sources/dev/install/installation.txt View File

1
 Installation
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
 Source: https://about.okhin.fr/posts/Searx/ with some additions
6
 Source: https://about.okhin.fr/posts/Searx/ with some additions
7
 
7
 
8
 How to: `Setup searx in a couple of hours with a free SSL
8
 How to: `Setup searx in a couple of hours with a free SSL
9
 certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
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
 Basic installation
14
 Basic installation
12
 ------------------
15
 ------------------
13
 
16
 
14
 For Ubuntu, be sure to have enable universe repository.
17
 For Ubuntu, be sure to have enable universe repository.
15
 
18
 
16
-Install packages :
19
+Install packages:
17
 
20
 
18
 .. code:: sh
21
 .. code:: sh
19
 
22
 
20
     sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev
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
 .. code:: sh
27
 .. code:: sh
25
 
28
 
28
     sudo useradd searx -d /usr/local/searx
31
     sudo useradd searx -d /usr/local/searx
29
     sudo chown searx:searx -R /usr/local/searx
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
 .. code:: sh
36
 .. code:: sh
34
 
37
 
36
     cd /usr/local/searx
39
     cd /usr/local/searx
37
     virtualenv searx-ve
40
     virtualenv searx-ve
38
     . ./searx-ve/bin/activate
41
     . ./searx-ve/bin/activate
39
-    pip install -r requirements.txt
40
-    python setup.py install
42
+    ./manage.sh update_packages
41
 
43
 
42
 Configuration
44
 Configuration
43
 -------------
45
 -------------
51
 Check
53
 Check
52
 -----
54
 -----
53
 
55
 
54
-Start searx :
56
+Start searx:
55
 
57
 
56
 .. code:: sh
58
 .. code:: sh
57
 
59
 
59
 
61
 
60
 Go to http://localhost:8888
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
 .. code:: sh
66
 .. code:: sh
65
 
67
 
73
 uwsgi
75
 uwsgi
74
 -----
76
 -----
75
 
77
 
76
-Install packages :
78
+Install packages:
77
 
79
 
78
 .. code:: sh
80
 .. code:: sh
79
 
81
 
80
     sudo apt-get install uwsgi uwsgi-plugin-python
82
     sudo apt-get install uwsgi uwsgi-plugin-python
81
 
83
 
82
 Create the configuration file /etc/uwsgi/apps-available/searx.ini with
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
     pythonpath = /usr/local/searx/
113
     pythonpath = /usr/local/searx/
112
     chdir = /usr/local/searx/searx/
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
 .. code:: sh
118
 .. code:: sh
117
 
119
 
126
 ^^^^^^^^^^
128
 ^^^^^^^^^^
127
 
129
 
128
 If nginx is not installed (uwsgi will not work with the package
130
 If nginx is not installed (uwsgi will not work with the package
129
-nginx-light) :
131
+nginx-light):
130
 
132
 
131
 .. code:: sh
133
 .. code:: sh
132
 
134
 
136
 """""""""""
138
 """""""""""
137
 
139
 
138
 Create the configuration file /etc/nginx/sites-available/searx with this
140
 Create the configuration file /etc/nginx/sites-available/searx with this
139
-content :
141
+content:
140
 
142
 
141
 .. code:: nginx
143
 .. code:: nginx
142
 
144
 
151
         }
153
         }
152
     }
154
     }
153
 
155
 
154
-Restart service :
156
+Restart service:
155
 
157
 
156
 .. code:: sh
158
 .. code:: sh
157
 
159
 
159
     sudo service uwsgi restart
161
     sudo service uwsgi restart
160
 
162
 
161
 from subdirectory URL (/searx)
163
 from subdirectory URL (/searx)
162
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
164
+""""""""""""""""""""""""""""""
163
 
165
 
164
 Add this configuration in the server config file
166
 Add this configuration in the server config file
165
-/etc/nginx/sites-available/default :
167
+/etc/nginx/sites-available/default:
166
 
168
 
167
 .. code:: nginx
169
 .. code:: nginx
168
 
170
 
183
 
185
 
184
     base_url : http://your.domain.tld/searx/
186
     base_url : http://your.domain.tld/searx/
185
 
187
 
186
-Restart service :
188
+Restart service:
187
 
189
 
188
 .. code:: sh
190
 .. code:: sh
189
 
191
 
195
 
197
 
196
 for better privacy you can disable nginx logs about searx.
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
 /etc/nginx/sites-available/default add
201
 /etc/nginx/sites-available/default add
200
 
202
 
201
 ::
203
 ::
203
     access_log /dev/null;
205
     access_log /dev/null;
204
     error_log /dev/null;
206
     error_log /dev/null;
205
 
207
 
206
-Restart service :
208
+Restart service:
207
 
209
 
208
 .. code:: sh
210
 .. code:: sh
209
 
211
 
210
     sudo service nginx restart
212
     sudo service nginx restart
211
 
213
 
212
 with apache
214
 with apache
213
------------
215
+^^^^^^^^^^^
214
 
216
 
215
-Add wsgi mod :
217
+Add wsgi mod:
216
 
218
 
217
 .. code:: sh
219
 .. code:: sh
218
 
220
 
219
     sudo apt-get install libapache2-mod-uwsgi
221
     sudo apt-get install libapache2-mod-uwsgi
220
     sudo a2enmod uwsgi
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
 .. code:: apache
226
 .. code:: apache
225
 
227
 
233
 change ``<Location />`` by the location of your instance, like
235
 change ``<Location />`` by the location of your instance, like
234
 ``<Location /searx>``.
236
 ``<Location /searx>``.
235
 
237
 
236
-Restart Apache :
238
+Restart Apache:
237
 
239
 
238
 .. code:: sh
240
 .. code:: sh
239
 
241
 
240
     sudo /etc/init.d/apache2 restart
242
     sudo /etc/init.d/apache2 restart
241
 
243
 
242
 disable logs
244
 disable logs
243
-------------
245
+""""""""""""
244
 
246
 
245
 For better privacy you can disable Apache logs.
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
 for a specific path.
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
 .. code:: apache
256
 .. code:: apache
255
 
257
 
256
     CustomLog /dev/null combined
258
     CustomLog /dev/null combined
257
 
259
 
258
-Restart Apache :
260
+Restart Apache:
259
 
261
 
260
 .. code:: sh
262
 .. code:: sh
261
 
263
 
272
     git stash
274
     git stash
273
     git pull origin master
275
     git pull origin master
274
     git stash apply
276
     git stash apply
275
-    pip install --upgrade -r requirements.txt
277
+    ./manage.sh update_packages
276
     sudo service uwsgi restart
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 View File

24
     <script type="text/javascript" src="../../_static/underscore.js"></script>
24
     <script type="text/javascript" src="../../_static/underscore.js"></script>
25
     <script type="text/javascript" src="../../_static/doctools.js"></script>
25
     <script type="text/javascript" src="../../_static/doctools.js"></script>
26
     <link rel="top" title="searx 0.8.0 documentation" href="../../index.html" />
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
     <link rel="prev" title="How to contribute" href="../contribution_guide.html" />
28
     <link rel="prev" title="How to contribute" href="../contribution_guide.html" />
29
    
29
    
30
   
30
   
40
           <div class="body" role="main">
40
           <div class="body" role="main">
41
             
41
             
42
   <div class="section" id="installation">
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
 <p>Source: <a class="reference external" href="https://about.okhin.fr/posts/Searx/">https://about.okhin.fr/posts/Searx/</a> with some additions</p>
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
 <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
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
 certificate</a></p>
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
 <div class="section" id="basic-installation">
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
 <p>For Ubuntu, be sure to have enable universe repository.</p>
69
 <p>For Ubuntu, be sure to have enable universe repository.</p>
51
-<p>Install packages :</p>
70
+<p>Install packages:</p>
52
 <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
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
 </pre></div>
72
 </pre></div>
54
 </div>
73
 </div>
55
-<p>Install searx :</p>
74
+<p>Install searx:</p>
56
 <div class="code sh highlight-python"><div class="highlight"><pre>cd /usr/local
75
 <div class="code sh highlight-python"><div class="highlight"><pre>cd /usr/local
57
 sudo git clone https://github.com/asciimoo/searx.git
76
 sudo git clone https://github.com/asciimoo/searx.git
58
 sudo useradd searx -d /usr/local/searx
77
 sudo useradd searx -d /usr/local/searx
59
 sudo chown searx:searx -R /usr/local/searx
78
 sudo chown searx:searx -R /usr/local/searx
60
 </pre></div>
79
 </pre></div>
61
 </div>
80
 </div>
62
-<p>Install dependencies in a virtualenv :</p>
81
+<p>Install dependencies in a virtualenv:</p>
63
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo -u searx -i
82
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo -u searx -i
64
 cd /usr/local/searx
83
 cd /usr/local/searx
65
 virtualenv searx-ve
84
 virtualenv searx-ve
66
 . ./searx-ve/bin/activate
85
 . ./searx-ve/bin/activate
67
-pip install -r requirements.txt
68
-python setup.py install
86
+./manage.sh update_packages
69
 </pre></div>
87
 </pre></div>
70
 </div>
88
 </div>
71
 </div>
89
 </div>
72
 <div class="section" id="configuration">
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
 <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
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
 </pre></div>
93
 </pre></div>
76
 </div>
94
 </div>
77
 <p>Edit searx/settings.yml if necessary.</p>
95
 <p>Edit searx/settings.yml if necessary.</p>
78
 </div>
96
 </div>
79
 <div class="section" id="check">
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
 <div class="code sh highlight-python"><div class="highlight"><pre>python searx/webapp.py
100
 <div class="code sh highlight-python"><div class="highlight"><pre>python searx/webapp.py
83
 </pre></div>
101
 </pre></div>
84
 </div>
102
 </div>
85
 <p>Go to <a class="reference external" href="http://localhost:8888">http://localhost:8888</a></p>
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
 <div class="code sh highlight-python"><div class="highlight"><pre>sed -i -e &quot;s/debug : True/debug : False/g&quot; searx/settings.yml
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
 </pre></div>
106
 </pre></div>
89
 </div>
107
 </div>
92
 twice).</p>
110
 twice).</p>
93
 </div>
111
 </div>
94
 <div class="section" id="uwsgi">
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
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install uwsgi uwsgi-plugin-python
115
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install uwsgi uwsgi-plugin-python
98
 </pre></div>
116
 </pre></div>
99
 </div>
117
 </div>
100
 <p>Create the configuration file /etc/uwsgi/apps-available/searx.ini with
118
 <p>Create the configuration file /etc/uwsgi/apps-available/searx.ini with
101
-this content :</p>
119
+this content:</p>
102
 <div class="highlight-python"><div class="highlight"><pre>[uwsgi]
120
 <div class="highlight-python"><div class="highlight"><pre>[uwsgi]
103
 # Who will run the code
121
 # Who will run the code
104
 uid = searx
122
 uid = searx
127
 chdir = /usr/local/searx/searx/
145
 chdir = /usr/local/searx/searx/
128
 </pre></div>
146
 </pre></div>
129
 </div>
147
 </div>
130
-<p>Activate the uwsgi application and restart :</p>
148
+<p>Activate the uwsgi application and restart:</p>
131
 <div class="code sh highlight-python"><div class="highlight"><pre>cd /etc/uwsgi/apps-enabled
149
 <div class="code sh highlight-python"><div class="highlight"><pre>cd /etc/uwsgi/apps-enabled
132
 ln -s ../apps-available/searx.ini
150
 ln -s ../apps-available/searx.ini
133
 /etc/init.d/uwsgi restart
151
 /etc/init.d/uwsgi restart
135
 </div>
153
 </div>
136
 </div>
154
 </div>
137
 <div class="section" id="web-server">
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
 <div class="section" id="with-nginx">
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
 <p>If nginx is not installed (uwsgi will not work with the package
159
 <p>If nginx is not installed (uwsgi will not work with the package
142
-nginx-light) :</p>
160
+nginx-light):</p>
143
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install nginx
161
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install nginx
144
 </pre></div>
162
 </pre></div>
145
 </div>
163
 </div>
146
 <div class="section" id="hosted-at">
164
 <div class="section" id="hosted-at">
147
 <h4>Hosted at /<a class="headerlink" href="#hosted-at" title="Permalink to this headline">¶</a></h4>
165
 <h4>Hosted at /<a class="headerlink" href="#hosted-at" title="Permalink to this headline">¶</a></h4>
148
 <p>Create the configuration file /etc/nginx/sites-available/searx with this
166
 <p>Create the configuration file /etc/nginx/sites-available/searx with this
149
-content :</p>
167
+content:</p>
150
 <div class="code nginx highlight-python"><div class="highlight"><pre>server {
168
 <div class="code nginx highlight-python"><div class="highlight"><pre>server {
151
     listen 80;
169
     listen 80;
152
     server_name searx.example.com;
170
     server_name searx.example.com;
159
 }
177
 }
160
 </pre></div>
178
 </pre></div>
161
 </div>
179
 </div>
162
-<p>Restart service :</p>
180
+<p>Restart service:</p>
163
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
181
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
164
 sudo service uwsgi restart
182
 sudo service uwsgi restart
165
 </pre></div>
183
 </pre></div>
166
 </div>
184
 </div>
185
+</div>
167
 <div class="section" id="from-subdirectory-url-searx">
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
 <p>Add this configuration in the server config file
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
 <div class="code nginx highlight-python"><div class="highlight"><pre>location = /searx { rewrite ^ /searx/; }
190
 <div class="code nginx highlight-python"><div class="highlight"><pre>location = /searx { rewrite ^ /searx/; }
172
 location /searx {
191
 location /searx {
173
         try_files $uri @searx;
192
         try_files $uri @searx;
184
 <div class="highlight-python"><div class="highlight"><pre>base_url : http://your.domain.tld/searx/
203
 <div class="highlight-python"><div class="highlight"><pre>base_url : http://your.domain.tld/searx/
185
 </pre></div>
204
 </pre></div>
186
 </div>
205
 </div>
187
-<p>Restart service :</p>
206
+<p>Restart service:</p>
188
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
207
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
189
 sudo service uwsgi restart
208
 sudo service uwsgi restart
190
 </pre></div>
209
 </pre></div>
191
 </div>
210
 </div>
192
-</div>
193
 <div class="section" id="disable-logs">
211
 <div class="section" id="disable-logs">
194
 <h5>disable logs<a class="headerlink" href="#disable-logs" title="Permalink to this headline">¶</a></h5>
212
 <h5>disable logs<a class="headerlink" href="#disable-logs" title="Permalink to this headline">¶</a></h5>
195
 <p>for better privacy you can disable nginx logs about searx.</p>
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
 /etc/nginx/sites-available/default add</p>
215
 /etc/nginx/sites-available/default add</p>
198
 <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>
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
 <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>
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
 </pre></div>
218
 </pre></div>
201
 </div>
219
 </div>
202
-<p>Restart service :</p>
220
+<p>Restart service:</p>
203
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
221
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
204
 </pre></div>
222
 </pre></div>
205
 </div>
223
 </div>
206
 </div>
224
 </div>
207
 </div>
225
 </div>
208
 </div>
226
 </div>
209
-</div>
210
 <div class="section" id="with-apache">
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
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install libapache2-mod-uwsgi
230
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install libapache2-mod-uwsgi
214
 sudo a2enmod uwsgi
231
 sudo a2enmod uwsgi
215
 </pre></div>
232
 </pre></div>
216
 </div>
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
 <div class="code apache highlight-python"><div class="highlight"><pre>&lt;Location /&gt;
235
 <div class="code apache highlight-python"><div class="highlight"><pre>&lt;Location /&gt;
219
     Options FollowSymLinks Indexes
236
     Options FollowSymLinks Indexes
220
     SetHandler uwsgi-handler
237
     SetHandler uwsgi-handler
225
 <p>Note that if your instance of searx is not at the root, you should
242
 <p>Note that if your instance of searx is not at the root, you should
226
 change <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> by the location of your instance, like
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
 <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/searx&gt;</span></code>.</p>
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
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
246
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
230
 </pre></div>
247
 </pre></div>
231
 </div>
248
 </div>
232
-</div>
233
 <div class="section" id="id1">
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
 <p>For better privacy you can disable Apache logs.</p>
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
 for a specific path.</p>
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
 <div class="code apache highlight-python"><div class="highlight"><pre>CustomLog /dev/null combined
256
 <div class="code apache highlight-python"><div class="highlight"><pre>CustomLog /dev/null combined
241
 </pre></div>
257
 </pre></div>
242
 </div>
258
 </div>
243
-<p>Restart Apache :</p>
259
+<p>Restart Apache:</p>
244
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
260
 <div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
245
 </pre></div>
261
 </pre></div>
246
 </div>
262
 </div>
247
 </div>
263
 </div>
264
+</div>
265
+</div>
248
 <div class="section" id="how-to-update">
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
 <div class="code sh highlight-python"><div class="highlight"><pre>cd /usr/local/searx
268
 <div class="code sh highlight-python"><div class="highlight"><pre>cd /usr/local/searx
251
 sudo -u searx -i
269
 sudo -u searx -i
252
 . ./searx-ve/bin/activate
270
 . ./searx-ve/bin/activate
253
 git stash
271
 git stash
254
 git pull origin master
272
 git pull origin master
255
 git stash apply
273
 git stash apply
256
-pip install --upgrade -r requirements.txt
274
+./manage.sh update_packages
257
 sudo service uwsgi restart
275
 sudo service uwsgi restart
258
 </pre></div>
276
 </pre></div>
259
 </div>
277
 </div>
260
 </div>
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
 </div>
295
 </div>
262
 
296
 
263
 
297
 

+ 52
- 29
docs/dev/install/installation.rst View File

1
 Installation
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
 Source: https://about.okhin.fr/posts/Searx/ with some additions
6
 Source: https://about.okhin.fr/posts/Searx/ with some additions
7
 
7
 
8
 How to: `Setup searx in a couple of hours with a free SSL
8
 How to: `Setup searx in a couple of hours with a free SSL
9
 certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
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
 Basic installation
14
 Basic installation
12
 ------------------
15
 ------------------
13
 
16
 
14
 For Ubuntu, be sure to have enable universe repository.
17
 For Ubuntu, be sure to have enable universe repository.
15
 
18
 
16
-Install packages :
19
+Install packages:
17
 
20
 
18
 .. code:: sh
21
 .. code:: sh
19
 
22
 
20
     sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev
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
 .. code:: sh
27
 .. code:: sh
25
 
28
 
28
     sudo useradd searx -d /usr/local/searx
31
     sudo useradd searx -d /usr/local/searx
29
     sudo chown searx:searx -R /usr/local/searx
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
 .. code:: sh
36
 .. code:: sh
34
 
37
 
36
     cd /usr/local/searx
39
     cd /usr/local/searx
37
     virtualenv searx-ve
40
     virtualenv searx-ve
38
     . ./searx-ve/bin/activate
41
     . ./searx-ve/bin/activate
39
-    pip install -r requirements.txt
40
-    python setup.py install
42
+    ./manage.sh update_packages
41
 
43
 
42
 Configuration
44
 Configuration
43
 -------------
45
 -------------
51
 Check
53
 Check
52
 -----
54
 -----
53
 
55
 
54
-Start searx :
56
+Start searx:
55
 
57
 
56
 .. code:: sh
58
 .. code:: sh
57
 
59
 
59
 
61
 
60
 Go to http://localhost:8888
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
 .. code:: sh
66
 .. code:: sh
65
 
67
 
73
 uwsgi
75
 uwsgi
74
 -----
76
 -----
75
 
77
 
76
-Install packages :
78
+Install packages:
77
 
79
 
78
 .. code:: sh
80
 .. code:: sh
79
 
81
 
80
     sudo apt-get install uwsgi uwsgi-plugin-python
82
     sudo apt-get install uwsgi uwsgi-plugin-python
81
 
83
 
82
 Create the configuration file /etc/uwsgi/apps-available/searx.ini with
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
     pythonpath = /usr/local/searx/
113
     pythonpath = /usr/local/searx/
112
     chdir = /usr/local/searx/searx/
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
 .. code:: sh
118
 .. code:: sh
117
 
119
 
126
 ^^^^^^^^^^
128
 ^^^^^^^^^^
127
 
129
 
128
 If nginx is not installed (uwsgi will not work with the package
130
 If nginx is not installed (uwsgi will not work with the package
129
-nginx-light) :
131
+nginx-light):
130
 
132
 
131
 .. code:: sh
133
 .. code:: sh
132
 
134
 
136
 """""""""""
138
 """""""""""
137
 
139
 
138
 Create the configuration file /etc/nginx/sites-available/searx with this
140
 Create the configuration file /etc/nginx/sites-available/searx with this
139
-content :
141
+content:
140
 
142
 
141
 .. code:: nginx
143
 .. code:: nginx
142
 
144
 
151
         }
153
         }
152
     }
154
     }
153
 
155
 
154
-Restart service :
156
+Restart service:
155
 
157
 
156
 .. code:: sh
158
 .. code:: sh
157
 
159
 
159
     sudo service uwsgi restart
161
     sudo service uwsgi restart
160
 
162
 
161
 from subdirectory URL (/searx)
163
 from subdirectory URL (/searx)
162
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
164
+""""""""""""""""""""""""""""""
163
 
165
 
164
 Add this configuration in the server config file
166
 Add this configuration in the server config file
165
-/etc/nginx/sites-available/default :
167
+/etc/nginx/sites-available/default:
166
 
168
 
167
 .. code:: nginx
169
 .. code:: nginx
168
 
170
 
183
 
185
 
184
     base_url : http://your.domain.tld/searx/
186
     base_url : http://your.domain.tld/searx/
185
 
187
 
186
-Restart service :
188
+Restart service:
187
 
189
 
188
 .. code:: sh
190
 .. code:: sh
189
 
191
 
195
 
197
 
196
 for better privacy you can disable nginx logs about searx.
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
 /etc/nginx/sites-available/default add
201
 /etc/nginx/sites-available/default add
200
 
202
 
201
 ::
203
 ::
203
     access_log /dev/null;
205
     access_log /dev/null;
204
     error_log /dev/null;
206
     error_log /dev/null;
205
 
207
 
206
-Restart service :
208
+Restart service:
207
 
209
 
208
 .. code:: sh
210
 .. code:: sh
209
 
211
 
210
     sudo service nginx restart
212
     sudo service nginx restart
211
 
213
 
212
 with apache
214
 with apache
213
------------
215
+^^^^^^^^^^^
214
 
216
 
215
-Add wsgi mod :
217
+Add wsgi mod:
216
 
218
 
217
 .. code:: sh
219
 .. code:: sh
218
 
220
 
219
     sudo apt-get install libapache2-mod-uwsgi
221
     sudo apt-get install libapache2-mod-uwsgi
220
     sudo a2enmod uwsgi
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
 .. code:: apache
226
 .. code:: apache
225
 
227
 
233
 change ``<Location />`` by the location of your instance, like
235
 change ``<Location />`` by the location of your instance, like
234
 ``<Location /searx>``.
236
 ``<Location /searx>``.
235
 
237
 
236
-Restart Apache :
238
+Restart Apache:
237
 
239
 
238
 .. code:: sh
240
 .. code:: sh
239
 
241
 
240
     sudo /etc/init.d/apache2 restart
242
     sudo /etc/init.d/apache2 restart
241
 
243
 
242
 disable logs
244
 disable logs
243
-------------
245
+""""""""""""
244
 
246
 
245
 For better privacy you can disable Apache logs.
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
 for a specific path.
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
 .. code:: apache
256
 .. code:: apache
255
 
257
 
256
     CustomLog /dev/null combined
258
     CustomLog /dev/null combined
257
 
259
 
258
-Restart Apache :
260
+Restart Apache:
259
 
261
 
260
 .. code:: sh
262
 .. code:: sh
261
 
263
 
272
     git stash
274
     git stash
273
     git pull origin master
275
     git pull origin master
274
     git stash apply
276
     git stash apply
275
-    pip install --upgrade -r requirements.txt
277
+    ./manage.sh update_packages
276
     sudo service uwsgi restart
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 .