mirror of https://github.com/searx/searx
Merge pull request #490 from kvch/gh-pages
update & fix install guide after install refactor
This commit is contained in:
commit
1a8a35b10e
|
@ -1,25 +1,28 @@
|
|||
Installation
|
||||
============
|
||||
|
||||
Step by step installation for Debian / Ubuntu with virtualenv.
|
||||
Step by step installation for Debian/Ubuntu with virtualenv.
|
||||
|
||||
Source: https://about.okhin.fr/posts/Searx/ with some additions
|
||||
|
||||
How to: `Setup searx in a couple of hours with a free SSL
|
||||
certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
|
||||
|
||||
.. contents::
|
||||
:depth: 3
|
||||
|
||||
Basic installation
|
||||
------------------
|
||||
|
||||
For Ubuntu, be sure to have enable universe repository.
|
||||
|
||||
Install packages :
|
||||
Install packages:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev
|
||||
|
||||
Install searx :
|
||||
Install searx:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -28,7 +31,7 @@ Install searx :
|
|||
sudo useradd searx -d /usr/local/searx
|
||||
sudo chown searx:searx -R /usr/local/searx
|
||||
|
||||
Install dependencies in a virtualenv :
|
||||
Install dependencies in a virtualenv:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -36,8 +39,7 @@ Install dependencies in a virtualenv :
|
|||
cd /usr/local/searx
|
||||
virtualenv searx-ve
|
||||
. ./searx-ve/bin/activate
|
||||
pip install -r requirements.txt
|
||||
python setup.py install
|
||||
./manage.sh update_packages
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
@ -51,7 +53,7 @@ Edit searx/settings.yml if necessary.
|
|||
Check
|
||||
-----
|
||||
|
||||
Start searx :
|
||||
Start searx:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -59,7 +61,7 @@ Start searx :
|
|||
|
||||
Go to http://localhost:8888
|
||||
|
||||
If everything works fine, disable the debug option in settings.yml :
|
||||
If everything works fine, disable the debug option in settings.yml:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -73,14 +75,14 @@ twice).
|
|||
uwsgi
|
||||
-----
|
||||
|
||||
Install packages :
|
||||
Install packages:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get install uwsgi uwsgi-plugin-python
|
||||
|
||||
Create the configuration file /etc/uwsgi/apps-available/searx.ini with
|
||||
this content :
|
||||
this content:
|
||||
|
||||
::
|
||||
|
||||
|
@ -111,7 +113,7 @@ this content :
|
|||
pythonpath = /usr/local/searx/
|
||||
chdir = /usr/local/searx/searx/
|
||||
|
||||
Activate the uwsgi application and restart :
|
||||
Activate the uwsgi application and restart:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -126,7 +128,7 @@ with nginx
|
|||
^^^^^^^^^^
|
||||
|
||||
If nginx is not installed (uwsgi will not work with the package
|
||||
nginx-light) :
|
||||
nginx-light):
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -136,7 +138,7 @@ Hosted at /
|
|||
"""""""""""
|
||||
|
||||
Create the configuration file /etc/nginx/sites-available/searx with this
|
||||
content :
|
||||
content:
|
||||
|
||||
.. code:: nginx
|
||||
|
||||
|
@ -151,7 +153,7 @@ content :
|
|||
}
|
||||
}
|
||||
|
||||
Restart service :
|
||||
Restart service:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -159,10 +161,10 @@ Restart service :
|
|||
sudo service uwsgi restart
|
||||
|
||||
from subdirectory URL (/searx)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
""""""""""""""""""""""""""""""
|
||||
|
||||
Add this configuration in the server config file
|
||||
/etc/nginx/sites-available/default :
|
||||
/etc/nginx/sites-available/default:
|
||||
|
||||
.. code:: nginx
|
||||
|
||||
|
@ -183,7 +185,7 @@ Enable base\_url in searx/settings.yml
|
|||
|
||||
base_url : http://your.domain.tld/searx/
|
||||
|
||||
Restart service :
|
||||
Restart service:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -195,7 +197,7 @@ disable logs
|
|||
|
||||
for better privacy you can disable nginx logs about searx.
|
||||
|
||||
how to proceed : below ``uwsgi_pass`` in
|
||||
how to proceed: below ``uwsgi_pass`` in
|
||||
/etc/nginx/sites-available/default add
|
||||
|
||||
::
|
||||
|
@ -203,23 +205,23 @@ how to proceed : below ``uwsgi_pass`` in
|
|||
access_log /dev/null;
|
||||
error_log /dev/null;
|
||||
|
||||
Restart service :
|
||||
Restart service:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo service nginx restart
|
||||
|
||||
with apache
|
||||
-----------
|
||||
^^^^^^^^^^^
|
||||
|
||||
Add wsgi mod :
|
||||
Add wsgi mod:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get install libapache2-mod-uwsgi
|
||||
sudo a2enmod uwsgi
|
||||
|
||||
Add this configuration in the file /etc/apache2/apache2.conf :
|
||||
Add this configuration in the file /etc/apache2/apache2.conf:
|
||||
|
||||
.. code:: apache
|
||||
|
||||
|
@ -233,29 +235,29 @@ Note that if your instance of searx is not at the root, you should
|
|||
change ``<Location />`` by the location of your instance, like
|
||||
``<Location /searx>``.
|
||||
|
||||
Restart Apache :
|
||||
Restart Apache:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo /etc/init.d/apache2 restart
|
||||
|
||||
disable logs
|
||||
------------
|
||||
""""""""""""
|
||||
|
||||
For better privacy you can disable Apache logs.
|
||||
|
||||
WARNING : not tested
|
||||
WARNING: not tested
|
||||
|
||||
WARNING : you can only disable logs for the whole (virtual) server not
|
||||
WARNING: you can only disable logs for the whole (virtual) server not
|
||||
for a specific path.
|
||||
|
||||
Go back to /etc/apache2/apache2.conf and above ``<Location />`` add :
|
||||
Go back to /etc/apache2/apache2.conf and above ``<Location />`` add:
|
||||
|
||||
.. code:: apache
|
||||
|
||||
CustomLog /dev/null combined
|
||||
|
||||
Restart Apache :
|
||||
Restart Apache:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -272,6 +274,27 @@ How to update
|
|||
git stash
|
||||
git pull origin master
|
||||
git stash apply
|
||||
pip install --upgrade -r requirements.txt
|
||||
./manage.sh update_packages
|
||||
sudo service uwsgi restart
|
||||
|
||||
Docker
|
||||
------
|
||||
|
||||
Make sure you have installed Docker. For instance, you can deploy searx like this:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
docker pull wonderfall/searx
|
||||
docker run -d --name searx -p $PORT:8888 wonderfall/searx
|
||||
|
||||
Go to http://localhost:$PORT.
|
||||
|
||||
See https://hub.docker.com/r/wonderfall/searx/ for more informations.
|
||||
|
||||
It's also possible to build searx from the embedded Dockerfile.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
git clone https://github.com/asciimoo/searx.git
|
||||
cd searx
|
||||
docker build -t whatever/searx .
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="../../_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="../../_static/doctools.js"></script>
|
||||
<link rel="top" title="searx 0.8.0 documentation" href="../../index.html" />
|
||||
<link rel="next" title="Search API" href="../search_api.html" />
|
||||
<link rel="next" title="Engine overview" href="../engine_overview.html" />
|
||||
<link rel="prev" title="How to contribute" href="../contribution_guide.html" />
|
||||
|
||||
|
||||
|
@ -40,50 +40,68 @@
|
|||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="installation">
|
||||
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Step by step installation for Debian / Ubuntu with virtualenv.</p>
|
||||
<h1><a class="toc-backref" href="#id2">Installation</a><a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Step by step installation for Debian/Ubuntu with virtualenv.</p>
|
||||
<p>Source: <a class="reference external" href="https://about.okhin.fr/posts/Searx/">https://about.okhin.fr/posts/Searx/</a> with some additions</p>
|
||||
<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
|
||||
certificate</a></p>
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#installation" id="id2">Installation</a><ul>
|
||||
<li><a class="reference internal" href="#basic-installation" id="id3">Basic installation</a></li>
|
||||
<li><a class="reference internal" href="#configuration" id="id4">Configuration</a></li>
|
||||
<li><a class="reference internal" href="#check" id="id5">Check</a></li>
|
||||
<li><a class="reference internal" href="#uwsgi" id="id6">uwsgi</a></li>
|
||||
<li><a class="reference internal" href="#web-server" id="id7">Web server</a><ul>
|
||||
<li><a class="reference internal" href="#with-nginx" id="id8">with nginx</a></li>
|
||||
<li><a class="reference internal" href="#with-apache" id="id9">with apache</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#how-to-update" id="id10">How to update</a></li>
|
||||
<li><a class="reference internal" href="#docker" id="id11">Docker</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="basic-installation">
|
||||
<h2>Basic installation<a class="headerlink" href="#basic-installation" title="Permalink to this headline">¶</a></h2>
|
||||
<h2><a class="toc-backref" href="#id3">Basic installation</a><a class="headerlink" href="#basic-installation" title="Permalink to this headline">¶</a></h2>
|
||||
<p>For Ubuntu, be sure to have enable universe repository.</p>
|
||||
<p>Install packages :</p>
|
||||
<p>Install packages:</p>
|
||||
<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
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Install searx :</p>
|
||||
<p>Install searx:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>cd /usr/local
|
||||
sudo git clone https://github.com/asciimoo/searx.git
|
||||
sudo useradd searx -d /usr/local/searx
|
||||
sudo chown searx:searx -R /usr/local/searx
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Install dependencies in a virtualenv :</p>
|
||||
<p>Install dependencies in a virtualenv:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo -u searx -i
|
||||
cd /usr/local/searx
|
||||
virtualenv searx-ve
|
||||
. ./searx-ve/bin/activate
|
||||
pip install -r requirements.txt
|
||||
python setup.py install
|
||||
./manage.sh update_packages
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="configuration">
|
||||
<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
|
||||
<h2><a class="toc-backref" href="#id4">Configuration</a><a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Edit searx/settings.yml if necessary.</p>
|
||||
</div>
|
||||
<div class="section" id="check">
|
||||
<h2>Check<a class="headerlink" href="#check" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Start searx :</p>
|
||||
<h2><a class="toc-backref" href="#id5">Check</a><a class="headerlink" href="#check" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Start searx:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>python searx/webapp.py
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Go to <a class="reference external" href="http://localhost:8888">http://localhost:8888</a></p>
|
||||
<p>If everything works fine, disable the debug option in settings.yml :</p>
|
||||
<p>If everything works fine, disable the debug option in settings.yml:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sed -i -e "s/debug : True/debug : False/g" searx/settings.yml
|
||||
</pre></div>
|
||||
</div>
|
||||
|
@ -92,13 +110,13 @@ python setup.py install
|
|||
twice).</p>
|
||||
</div>
|
||||
<div class="section" id="uwsgi">
|
||||
<h2>uwsgi<a class="headerlink" href="#uwsgi" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Install packages :</p>
|
||||
<h2><a class="toc-backref" href="#id6">uwsgi</a><a class="headerlink" href="#uwsgi" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Install packages:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install uwsgi uwsgi-plugin-python
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Create the configuration file /etc/uwsgi/apps-available/searx.ini with
|
||||
this content :</p>
|
||||
this content:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre>[uwsgi]
|
||||
# Who will run the code
|
||||
uid = searx
|
||||
|
@ -127,7 +145,7 @@ pythonpath = /usr/local/searx/
|
|||
chdir = /usr/local/searx/searx/
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Activate the uwsgi application and restart :</p>
|
||||
<p>Activate the uwsgi application and restart:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>cd /etc/uwsgi/apps-enabled
|
||||
ln -s ../apps-available/searx.ini
|
||||
/etc/init.d/uwsgi restart
|
||||
|
@ -135,18 +153,18 @@ ln -s ../apps-available/searx.ini
|
|||
</div>
|
||||
</div>
|
||||
<div class="section" id="web-server">
|
||||
<h2>Web server<a class="headerlink" href="#web-server" title="Permalink to this headline">¶</a></h2>
|
||||
<h2><a class="toc-backref" href="#id7">Web server</a><a class="headerlink" href="#web-server" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="section" id="with-nginx">
|
||||
<h3>with nginx<a class="headerlink" href="#with-nginx" title="Permalink to this headline">¶</a></h3>
|
||||
<h3><a class="toc-backref" href="#id8">with nginx</a><a class="headerlink" href="#with-nginx" title="Permalink to this headline">¶</a></h3>
|
||||
<p>If nginx is not installed (uwsgi will not work with the package
|
||||
nginx-light) :</p>
|
||||
nginx-light):</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install nginx
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="section" id="hosted-at">
|
||||
<h4>Hosted at /<a class="headerlink" href="#hosted-at" title="Permalink to this headline">¶</a></h4>
|
||||
<p>Create the configuration file /etc/nginx/sites-available/searx with this
|
||||
content :</p>
|
||||
content:</p>
|
||||
<div class="code nginx highlight-python"><div class="highlight"><pre>server {
|
||||
listen 80;
|
||||
server_name searx.example.com;
|
||||
|
@ -159,15 +177,16 @@ content :</p>
|
|||
}
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Restart service :</p>
|
||||
<p>Restart service:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
|
||||
sudo service uwsgi restart
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="from-subdirectory-url-searx">
|
||||
<h5>from subdirectory URL (/searx)<a class="headerlink" href="#from-subdirectory-url-searx" title="Permalink to this headline">¶</a></h5>
|
||||
<h4>from subdirectory URL (/searx)<a class="headerlink" href="#from-subdirectory-url-searx" title="Permalink to this headline">¶</a></h4>
|
||||
<p>Add this configuration in the server config file
|
||||
/etc/nginx/sites-available/default :</p>
|
||||
/etc/nginx/sites-available/default:</p>
|
||||
<div class="code nginx highlight-python"><div class="highlight"><pre>location = /searx { rewrite ^ /searx/; }
|
||||
location /searx {
|
||||
try_files $uri @searx;
|
||||
|
@ -184,37 +203,35 @@ location @searx {
|
|||
<div class="highlight-python"><div class="highlight"><pre>base_url : http://your.domain.tld/searx/
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Restart service :</p>
|
||||
<p>Restart service:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
|
||||
sudo service uwsgi restart
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="disable-logs">
|
||||
<h5>disable logs<a class="headerlink" href="#disable-logs" title="Permalink to this headline">¶</a></h5>
|
||||
<p>for better privacy you can disable nginx logs about searx.</p>
|
||||
<p>how to proceed : below <code class="docutils literal"><span class="pre">uwsgi_pass</span></code> in
|
||||
<p>how to proceed: below <code class="docutils literal"><span class="pre">uwsgi_pass</span></code> in
|
||||
/etc/nginx/sites-available/default add</p>
|
||||
<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>
|
||||
<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>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Restart service :</p>
|
||||
<p>Restart service:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="with-apache">
|
||||
<h2>with apache<a class="headerlink" href="#with-apache" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Add wsgi mod :</p>
|
||||
<h3><a class="toc-backref" href="#id9">with apache</a><a class="headerlink" href="#with-apache" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Add wsgi mod:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install libapache2-mod-uwsgi
|
||||
sudo a2enmod uwsgi
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Add this configuration in the file /etc/apache2/apache2.conf :</p>
|
||||
<p>Add this configuration in the file /etc/apache2/apache2.conf:</p>
|
||||
<div class="code apache highlight-python"><div class="highlight"><pre><Location />
|
||||
Options FollowSymLinks Indexes
|
||||
SetHandler uwsgi-handler
|
||||
|
@ -225,39 +242,56 @@ sudo a2enmod uwsgi
|
|||
<p>Note that if your instance of searx is not at the root, you should
|
||||
change <code class="docutils literal"><span class="pre"><Location</span> <span class="pre">/></span></code> by the location of your instance, like
|
||||
<code class="docutils literal"><span class="pre"><Location</span> <span class="pre">/searx></span></code>.</p>
|
||||
<p>Restart Apache :</p>
|
||||
<p>Restart Apache:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id1">
|
||||
<h2>disable logs<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
|
||||
<h4>disable logs<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h4>
|
||||
<p>For better privacy you can disable Apache logs.</p>
|
||||
<p>WARNING : not tested</p>
|
||||
<p>WARNING : you can only disable logs for the whole (virtual) server not
|
||||
<p>WARNING: not tested</p>
|
||||
<p>WARNING: you can only disable logs for the whole (virtual) server not
|
||||
for a specific path.</p>
|
||||
<p>Go back to /etc/apache2/apache2.conf and above <code class="docutils literal"><span class="pre"><Location</span> <span class="pre">/></span></code> add :</p>
|
||||
<p>Go back to /etc/apache2/apache2.conf and above <code class="docutils literal"><span class="pre"><Location</span> <span class="pre">/></span></code> add:</p>
|
||||
<div class="code apache highlight-python"><div class="highlight"><pre>CustomLog /dev/null combined
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Restart Apache :</p>
|
||||
<p>Restart Apache:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="how-to-update">
|
||||
<h2>How to update<a class="headerlink" href="#how-to-update" title="Permalink to this headline">¶</a></h2>
|
||||
<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>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>cd /usr/local/searx
|
||||
sudo -u searx -i
|
||||
. ./searx-ve/bin/activate
|
||||
git stash
|
||||
git pull origin master
|
||||
git stash apply
|
||||
pip install --upgrade -r requirements.txt
|
||||
./manage.sh update_packages
|
||||
sudo service uwsgi restart
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="docker">
|
||||
<h2><a class="toc-backref" href="#id11">Docker</a><a class="headerlink" href="#docker" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Make sure you have installed Docker. For instance, you can deploy searx like this:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>docker pull wonderfall/searx
|
||||
docker run -d --name searx -p $PORT:8888 wonderfall/searx
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Go to <a class="reference external" href="http://localhost:$PORT">http://localhost:$PORT</a>.</p>
|
||||
<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>
|
||||
<p>It’s also possible to build searx from the embedded Dockerfile.</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>git clone https://github.com/asciimoo/searx.git
|
||||
cd searx
|
||||
docker build -t whatever/searx .
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -1,25 +1,28 @@
|
|||
Installation
|
||||
============
|
||||
|
||||
Step by step installation for Debian / Ubuntu with virtualenv.
|
||||
Step by step installation for Debian/Ubuntu with virtualenv.
|
||||
|
||||
Source: https://about.okhin.fr/posts/Searx/ with some additions
|
||||
|
||||
How to: `Setup searx in a couple of hours with a free SSL
|
||||
certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
|
||||
|
||||
.. contents::
|
||||
:depth: 3
|
||||
|
||||
Basic installation
|
||||
------------------
|
||||
|
||||
For Ubuntu, be sure to have enable universe repository.
|
||||
|
||||
Install packages :
|
||||
Install packages:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev
|
||||
|
||||
Install searx :
|
||||
Install searx:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -28,7 +31,7 @@ Install searx :
|
|||
sudo useradd searx -d /usr/local/searx
|
||||
sudo chown searx:searx -R /usr/local/searx
|
||||
|
||||
Install dependencies in a virtualenv :
|
||||
Install dependencies in a virtualenv:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -36,8 +39,7 @@ Install dependencies in a virtualenv :
|
|||
cd /usr/local/searx
|
||||
virtualenv searx-ve
|
||||
. ./searx-ve/bin/activate
|
||||
pip install -r requirements.txt
|
||||
python setup.py install
|
||||
./manage.sh update_packages
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
@ -51,7 +53,7 @@ Edit searx/settings.yml if necessary.
|
|||
Check
|
||||
-----
|
||||
|
||||
Start searx :
|
||||
Start searx:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -59,7 +61,7 @@ Start searx :
|
|||
|
||||
Go to http://localhost:8888
|
||||
|
||||
If everything works fine, disable the debug option in settings.yml :
|
||||
If everything works fine, disable the debug option in settings.yml:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -73,14 +75,14 @@ twice).
|
|||
uwsgi
|
||||
-----
|
||||
|
||||
Install packages :
|
||||
Install packages:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get install uwsgi uwsgi-plugin-python
|
||||
|
||||
Create the configuration file /etc/uwsgi/apps-available/searx.ini with
|
||||
this content :
|
||||
this content:
|
||||
|
||||
::
|
||||
|
||||
|
@ -111,7 +113,7 @@ this content :
|
|||
pythonpath = /usr/local/searx/
|
||||
chdir = /usr/local/searx/searx/
|
||||
|
||||
Activate the uwsgi application and restart :
|
||||
Activate the uwsgi application and restart:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -126,7 +128,7 @@ with nginx
|
|||
^^^^^^^^^^
|
||||
|
||||
If nginx is not installed (uwsgi will not work with the package
|
||||
nginx-light) :
|
||||
nginx-light):
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -136,7 +138,7 @@ Hosted at /
|
|||
"""""""""""
|
||||
|
||||
Create the configuration file /etc/nginx/sites-available/searx with this
|
||||
content :
|
||||
content:
|
||||
|
||||
.. code:: nginx
|
||||
|
||||
|
@ -151,7 +153,7 @@ content :
|
|||
}
|
||||
}
|
||||
|
||||
Restart service :
|
||||
Restart service:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -159,10 +161,10 @@ Restart service :
|
|||
sudo service uwsgi restart
|
||||
|
||||
from subdirectory URL (/searx)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
""""""""""""""""""""""""""""""
|
||||
|
||||
Add this configuration in the server config file
|
||||
/etc/nginx/sites-available/default :
|
||||
/etc/nginx/sites-available/default:
|
||||
|
||||
.. code:: nginx
|
||||
|
||||
|
@ -183,7 +185,7 @@ Enable base\_url in searx/settings.yml
|
|||
|
||||
base_url : http://your.domain.tld/searx/
|
||||
|
||||
Restart service :
|
||||
Restart service:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -195,7 +197,7 @@ disable logs
|
|||
|
||||
for better privacy you can disable nginx logs about searx.
|
||||
|
||||
how to proceed : below ``uwsgi_pass`` in
|
||||
how to proceed: below ``uwsgi_pass`` in
|
||||
/etc/nginx/sites-available/default add
|
||||
|
||||
::
|
||||
|
@ -203,23 +205,23 @@ how to proceed : below ``uwsgi_pass`` in
|
|||
access_log /dev/null;
|
||||
error_log /dev/null;
|
||||
|
||||
Restart service :
|
||||
Restart service:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo service nginx restart
|
||||
|
||||
with apache
|
||||
-----------
|
||||
^^^^^^^^^^^
|
||||
|
||||
Add wsgi mod :
|
||||
Add wsgi mod:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get install libapache2-mod-uwsgi
|
||||
sudo a2enmod uwsgi
|
||||
|
||||
Add this configuration in the file /etc/apache2/apache2.conf :
|
||||
Add this configuration in the file /etc/apache2/apache2.conf:
|
||||
|
||||
.. code:: apache
|
||||
|
||||
|
@ -233,29 +235,29 @@ Note that if your instance of searx is not at the root, you should
|
|||
change ``<Location />`` by the location of your instance, like
|
||||
``<Location /searx>``.
|
||||
|
||||
Restart Apache :
|
||||
Restart Apache:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo /etc/init.d/apache2 restart
|
||||
|
||||
disable logs
|
||||
------------
|
||||
""""""""""""
|
||||
|
||||
For better privacy you can disable Apache logs.
|
||||
|
||||
WARNING : not tested
|
||||
WARNING: not tested
|
||||
|
||||
WARNING : you can only disable logs for the whole (virtual) server not
|
||||
WARNING: you can only disable logs for the whole (virtual) server not
|
||||
for a specific path.
|
||||
|
||||
Go back to /etc/apache2/apache2.conf and above ``<Location />`` add :
|
||||
Go back to /etc/apache2/apache2.conf and above ``<Location />`` add:
|
||||
|
||||
.. code:: apache
|
||||
|
||||
CustomLog /dev/null combined
|
||||
|
||||
Restart Apache :
|
||||
Restart Apache:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
@ -272,6 +274,27 @@ How to update
|
|||
git stash
|
||||
git pull origin master
|
||||
git stash apply
|
||||
pip install --upgrade -r requirements.txt
|
||||
./manage.sh update_packages
|
||||
sudo service uwsgi restart
|
||||
|
||||
Docker
|
||||
------
|
||||
|
||||
Make sure you have installed Docker. For instance, you can deploy searx like this:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
docker pull wonderfall/searx
|
||||
docker run -d --name searx -p $PORT:8888 wonderfall/searx
|
||||
|
||||
Go to http://localhost:$PORT.
|
||||
|
||||
See https://hub.docker.com/r/wonderfall/searx/ for more informations.
|
||||
|
||||
It's also possible to build searx from the embedded Dockerfile.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
git clone https://github.com/asciimoo/searx.git
|
||||
cd searx
|
||||
docker build -t whatever/searx .
|
||||
|
|
Loading…
Reference in New Issue