on master help sign in
Merge pull request #490 from kvch/gh-pages
b61fb88Adam Tauber
docs/dev/install/installation.rst+52−29
@@ -1,25 +1,28 @@
1Installation
1Installation
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
6Source: https://about.okhin.fr/posts/Searx/ with some additions
6Source: https://about.okhin.fr/posts/Searx/ with some additions
7
7
8How to: `Setup searx in a couple of hours with a free SSL
8How to: `Setup searx in a couple of hours with a free SSL
9certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
9certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
10
10
11+.. contents::
12+ :depth: 3
13+
11Basic installation
14Basic installation
12------------------
15------------------
13
16
14For Ubuntu, be sure to have enable universe repository.
17For 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,7 +31,7 @@ Install searx :
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,8 +39,7 @@ Install dependencies in a virtualenv :
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
42+ ./manage.sh update_packages
40− python setup.py install
41
43
42Configuration
44Configuration
43-------------
45-------------
@@ -51,7 +53,7 @@ Edit searx/settings.yml if necessary.
51Check
53Check
52-----
54-----
53
55
54−Start searx :
56+Start searx:
55
57
56.. code:: sh
58.. code:: sh
57
59
@@ -59,7 +61,7 @@ Start searx :
59
61
60Go to http://localhost:8888
62Go 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,14 +75,14 @@ twice).
73uwsgi
75uwsgi
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
82Create the configuration file /etc/uwsgi/apps-available/searx.ini with
84Create 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 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,7 +128,7 @@ with nginx
126^^^^^^^^^^
128^^^^^^^^^^
127
129
128If nginx is not installed (uwsgi will not work with the package
130If 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,7 +138,7 @@ Hosted at /
136"""""""""""
138"""""""""""
137
139
138Create the configuration file /etc/nginx/sites-available/searx with this
140Create 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,7 +153,7 @@ content :
151 }
153 }
152 }
154 }
153
155
154−Restart service :
156+Restart service:
155
157
156.. code:: sh
158.. code:: sh
157
159
@@ -159,10 +161,10 @@ Restart service :
159 sudo service uwsgi restart
161 sudo service uwsgi restart
160
162
161from subdirectory URL (/searx)
163from subdirectory URL (/searx)
162−~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
164+""""""""""""""""""""""""""""""
163
165
164Add this configuration in the server config file
166Add 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,7 +185,7 @@ Enable base\_url in searx/settings.yml
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,7 +197,7 @@ disable logs
195
197
196for better privacy you can disable nginx logs about searx.
198for 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,23 +205,23 @@ how to proceed : below ``uwsgi_pass`` in
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
212with apache
214with 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,29 +235,29 @@ Note that if your instance of searx is not at the root, you should
233change ``<Location />`` by the location of your instance, like
235change ``<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
242disable logs
244disable logs
243−------------
245+""""""""""""
244
246
245For better privacy you can disable Apache logs.
247For 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
250for a specific path.
252for 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,6 +274,27 @@ How to update
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 .