mirror of https://github.com/searx/searx
358 lines
16 KiB
HTML
358 lines
16 KiB
HTML
|
|
|||
|
<!DOCTYPE html>
|
|||
|
|
|||
|
<html>
|
|||
|
<head>
|
|||
|
<meta charset="utf-8" />
|
|||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|||
|
<title>Step by step installation — Searx Documentation (Searx-0.16.0.tex)</title>
|
|||
|
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
|
|||
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|||
|
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css" />
|
|||
|
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/menu.min.css" />
|
|||
|
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.css" />
|
|||
|
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/tabs.css" />
|
|||
|
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
|||
|
<script src="../_static/jquery.js"></script>
|
|||
|
<script src="../_static/underscore.js"></script>
|
|||
|
<script src="../_static/doctools.js"></script>
|
|||
|
<script src="../_static/language_data.js"></script>
|
|||
|
<script src="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.js"></script>
|
|||
|
<script src="../_static/sphinx_tabs/tabs.js"></script>
|
|||
|
<link rel="index" title="Index" href="../genindex.html" />
|
|||
|
<link rel="search" title="Search" href="../search.html" />
|
|||
|
<link rel="next" title="uwsgi" href="installation-uwsgi.html" />
|
|||
|
<link rel="prev" title="Installation" href="installation.html" />
|
|||
|
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
|
|||
|
|
|||
|
</head><body>
|
|||
|
<div class="related" role="navigation" aria-label="related navigation">
|
|||
|
<h3>Navigation</h3>
|
|||
|
<ul>
|
|||
|
<li class="right" style="margin-right: 10px">
|
|||
|
<a href="../genindex.html" title="General Index"
|
|||
|
accesskey="I">index</a></li>
|
|||
|
<li class="right" >
|
|||
|
<a href="installation-uwsgi.html" title="uwsgi"
|
|||
|
accesskey="N">next</a> |</li>
|
|||
|
<li class="right" >
|
|||
|
<a href="installation.html" title="Installation"
|
|||
|
accesskey="P">previous</a> |</li>
|
|||
|
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> »</li>
|
|||
|
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="document">
|
|||
|
<div class="documentwrapper">
|
|||
|
<div class="bodywrapper">
|
|||
|
<div class="body" role="main">
|
|||
|
|
|||
|
<div class="section" id="step-by-step-installation">
|
|||
|
<span id="installation-basic"></span><h1>Step by step installation<a class="headerlink" href="#step-by-step-installation" title="Permalink to this headline">¶</a></h1>
|
|||
|
<div class="contents local topic" id="contents">
|
|||
|
<p class="topic-title">Contents</p>
|
|||
|
<ul class="simple">
|
|||
|
<li><p><a class="reference internal" href="#install-packages" id="id2">Install packages</a></p></li>
|
|||
|
<li><p><a class="reference internal" href="#create-user" id="id3">Create user</a></p></li>
|
|||
|
<li><p><a class="reference internal" href="#install-searx-dependencies" id="id4">install searx & dependencies</a></p></li>
|
|||
|
<li><p><a class="reference internal" href="#configuration" id="id5">Configuration</a></p></li>
|
|||
|
<li><p><a class="reference internal" href="#check" id="id6">Check</a></p></li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
<p>Step by step installation with virtualenv. For Ubuntu, be sure to have enable
|
|||
|
universe repository.</p>
|
|||
|
<div class="section" id="install-packages">
|
|||
|
<span id="id1"></span><h2><a class="toc-backref" href="#id2">Install packages</a><a class="headerlink" href="#install-packages" title="Permalink to this headline">¶</a></h2>
|
|||
|
<div class="sphinx-tabs docutils container">
|
|||
|
<div class="ui top attached tabular menu sphinx-menu docutils container">
|
|||
|
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
|
|||
|
<div class="docutils container">
|
|||
|
<p>Ubuntu / debian</p>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
|
|||
|
<div class="docutils container">
|
|||
|
<p>Arch Linux</p>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
|
|||
|
<div class="docutils container">
|
|||
|
<p>Fedora / RHEL</p>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
|
|||
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H apt-get install -y <span class="se">\</span>
|
|||
|
virtualenv python3-dev python3-babel python3-venv <span class="se">\</span>
|
|||
|
uwsgi uwsgi-plugin-python3 <span class="se">\</span>
|
|||
|
git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev <span class="se">\</span>
|
|||
|
shellcheck
|
|||
|
</pre></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
|
|||
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H pacman -S --noconfirm <span class="se">\</span>
|
|||
|
python-virtualenv python python-pip python-lxml python-babel <span class="se">\</span>
|
|||
|
uwsgi uwsgi-plugin-python <span class="se">\</span>
|
|||
|
git base-devel libxml2 <span class="se">\</span>
|
|||
|
shellcheck
|
|||
|
</pre></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
|
|||
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H dnf install -y <span class="se">\</span>
|
|||
|
virtualenv python python-pip python-lxml python-babel <span class="se">\</span>
|
|||
|
uwsgi uwsgi-plugin-python3 <span class="se">\</span>
|
|||
|
git @development-tools libxml2 <span class="se">\</span>
|
|||
|
ShellCheck
|
|||
|
</pre></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="admonition hint">
|
|||
|
<p class="admonition-title">Hint</p>
|
|||
|
<p>This installs also the packages needed by <a class="reference internal" href="installation-uwsgi.html#searx-uwsgi"><span class="std std-ref">uwsgi</span></a></p>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="section" id="create-user">
|
|||
|
<span id="create-searx-user"></span><h2><a class="toc-backref" href="#id3">Create user</a><a class="headerlink" href="#create-user" title="Permalink to this headline">¶</a></h2>
|
|||
|
<div class="sphinx-tabs docutils container">
|
|||
|
<div class="ui top attached tabular menu sphinx-menu docutils container">
|
|||
|
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
|
|||
|
<div class="docutils container">
|
|||
|
<p>bash</p>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
|
|||
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H useradd --shell /bin/bash --system <span class="se">\</span>
|
|||
|
--home-dir /usr/local/searx <span class="se">\</span>
|
|||
|
--comment Privacy-respecting metasearch engine searx
|
|||
|
|
|||
|
$ sudo -H mkdir /usr/local/searx
|
|||
|
$ sudo -H chown -R searx:searx /usr/local/searx
|
|||
|
</pre></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="section" id="install-searx-dependencies">
|
|||
|
<span id="searx-src"></span><h2><a class="toc-backref" href="#id4">install searx & dependencies</a><a class="headerlink" href="#install-searx-dependencies" title="Permalink to this headline">¶</a></h2>
|
|||
|
<p>Start a interactive shell from new created user and clone searx:</p>
|
|||
|
<div class="sphinx-tabs docutils container">
|
|||
|
<div class="ui top attached tabular menu sphinx-menu docutils container">
|
|||
|
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
|
|||
|
<div class="docutils container">
|
|||
|
<p>bash</p>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
|
|||
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H -u searx -i
|
|||
|
<span class="o">(</span>searx<span class="o">)</span>$ git clone https://github.com/asciimoo/searx.git /usr/local/searx/searx-src
|
|||
|
</pre></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<p>In the same shell create <em>virtualenv</em>:</p>
|
|||
|
<div class="sphinx-tabs docutils container">
|
|||
|
<div class="ui top attached tabular menu sphinx-menu docutils container">
|
|||
|
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
|
|||
|
<div class="docutils container">
|
|||
|
<p>bash</p>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
|
|||
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="o">(</span>searx<span class="o">)</span>$ python3 -m venv /usr/local/searx/searx-pyenv
|
|||
|
<span class="o">(</span>searx<span class="o">)</span>$ <span class="nb">echo</span> . /usr/local/searx/searx-pyenv/bin/activate >> /usr/local/searx/.profile
|
|||
|
</pre></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<p>To install searx’s dependencies, exit the searx <em>bash</em> session you opened above
|
|||
|
and restart a new. Before install, first check if your <em>virualenv</em> was sourced
|
|||
|
from the login (<em>~/.profile</em>):</p>
|
|||
|
<div class="sphinx-tabs docutils container">
|
|||
|
<div class="ui top attached tabular menu sphinx-menu docutils container">
|
|||
|
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
|
|||
|
<div class="docutils container">
|
|||
|
<p>bash</p>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
|
|||
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H -u searx -i
|
|||
|
|
|||
|
<span class="o">(</span>searx<span class="o">)</span>$ <span class="nb">command</span> -v python <span class="o">&&</span> python --version
|
|||
|
/usr/local/searx/searx-pyenv/bin/python
|
|||
|
Python 3.8.1
|
|||
|
|
|||
|
<span class="o">(</span>searx<span class="o">)</span>$ <span class="nb">cd</span> /usr/local/searx/searx-src
|
|||
|
<span class="o">(</span>searx<span class="o">)</span>$ ./manage.sh update_packages
|
|||
|
</pre></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="admonition tip">
|
|||
|
<p class="admonition-title">Tip</p>
|
|||
|
<p>Open a second terminal for the configuration tasks and left the <code class="docutils literal notranslate"><span class="pre">(searx)$</span></code>
|
|||
|
terminal open for the tasks below.</p>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="section" id="configuration">
|
|||
|
<h2><a class="toc-backref" href="#id5">Configuration</a><a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
|
|||
|
<p>Create a copy of the <a class="reference external" href="https://github.com/return42/searx/blob/filtron/searx/settings.yml">git://searx/settings.yml</a> configuration file in system’s
|
|||
|
<em>/etc</em> folder. Configure like shown below – replace <code class="docutils literal notranslate"><span class="pre">searx@\$(uname</span> <span class="pre">-n)</span></code> with
|
|||
|
a name of your choice – <em>and/or</em> edit <code class="docutils literal notranslate"><span class="pre">/etc/searx/settings.yml</span></code> if necessary.</p>
|
|||
|
<div class="sphinx-tabs docutils container">
|
|||
|
<div class="ui top attached tabular menu sphinx-menu docutils container">
|
|||
|
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
|
|||
|
<div class="docutils container">
|
|||
|
<p>bash</p>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
|
|||
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H cp /usr/local/searx/searx-src/searx/settings.yml /etc/searx/settings.yml
|
|||
|
$ sudo -H sed -i -e s/ultrasecretkey/<span class="se">\e</span>0e9fd261901a9307bd6b86e88c26bb0/g /etc/searx/settings.yml
|
|||
|
$ sudo -H sed -i -e s/<span class="o">{</span>instance_name<span class="o">}</span>/searx@<span class="se">\r</span>yzen/g /etc/searx/settings.yml
|
|||
|
</pre></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="section" id="check">
|
|||
|
<h2><a class="toc-backref" href="#id6">Check</a><a class="headerlink" href="#check" title="Permalink to this headline">¶</a></h2>
|
|||
|
<p>To check your searx setup, optional enable debugging and start the <em>webapp</em>.
|
|||
|
Searx looks at the exported environment <code class="docutils literal notranslate"><span class="pre">$SEARX_SETTINGS_PATH</span></code> for a
|
|||
|
configuration file.</p>
|
|||
|
<div class="sphinx-tabs docutils container">
|
|||
|
<div class="ui top attached tabular menu sphinx-menu docutils container">
|
|||
|
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
|
|||
|
<div class="docutils container">
|
|||
|
<p>bash</p>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
|
|||
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># enable debug ..</span>
|
|||
|
$ sudo -H sed -i -e s/debug : False/debug : True/g /etc/searx/settings.yml
|
|||
|
|
|||
|
<span class="c1"># start webapp</span>
|
|||
|
$ sudo -H -u searx -i
|
|||
|
<span class="o">(</span>searx<span class="o">)</span>$ <span class="nb">cd</span> /usr/local/searx/searx-src
|
|||
|
<span class="o">(</span>searx<span class="o">)</span>$ <span class="nb">export</span> <span class="nv">SEARX_SETTINGS_PATH</span><span class="o">=</span>/etc/searx/settings.yml
|
|||
|
<span class="o">(</span>searx<span class="o">)</span>$ python searx/webapp.py
|
|||
|
|
|||
|
<span class="c1"># disable debug</span>
|
|||
|
$ sudo -H sed -i -e s/debug : True/debug : False/g /etc/searx/settings.yml
|
|||
|
</pre></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<p>Open WEB browser and visit <a class="reference external" href="http://">http://</a> . If you are inside a
|
|||
|
container or in a script, test with curl:</p>
|
|||
|
<div class="sphinx-tabs docutils container">
|
|||
|
<div class="ui top attached tabular menu sphinx-menu docutils container">
|
|||
|
<div class="active item sphinx-data-tab-V0VCIGJyb3dzZXI= docutils container">
|
|||
|
<div class="docutils container">
|
|||
|
<p>WEB browser</p>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="item sphinx-data-tab-Y3VybA== docutils container">
|
|||
|
<div class="docutils container">
|
|||
|
<p>curl</p>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-V0VCIGJyb3dzZXI= active docutils container">
|
|||
|
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ xgd-open http://
|
|||
|
</pre></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-Y3VybA== docutils container">
|
|||
|
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ curl --location --verbose --head --insecure
|
|||
|
|
|||
|
* Trying 127.0.0.1:8888...
|
|||
|
* TCP_NODELAY set
|
|||
|
* Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0)
|
|||
|
> HEAD / HTTP/1.1
|
|||
|
> Host: 127.0.0.1:8888
|
|||
|
> User-Agent: curl/7.68.0
|
|||
|
> Accept: */*
|
|||
|
>
|
|||
|
* Mark bundle as not supporting multiuse
|
|||
|
* HTTP 1.0, assume close after body
|
|||
|
< HTTP/1.0 200 OK
|
|||
|
HTTP/1.0 200 OK
|
|||
|
...
|
|||
|
</pre></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<p>If everything works fine, hit <code class="docutils literal notranslate"><span class="pre">[CTRL-C]</span></code> to stop the <em>webapp</em> and disable the
|
|||
|
debug option in <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>. You can now exit searx user bash (enter exit
|
|||
|
command twice). At this point searx is not demonized; uwsgi allows this.</p>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<span id="sidebar-top"></span>
|
|||
|
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
|||
|
<div class="sphinxsidebarwrapper">
|
|||
|
|
|||
|
|
|||
|
<p class="logo"><a href="../index.html">
|
|||
|
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
|
|||
|
</a></p>
|
|||
|
|
|||
|
|
|||
|
<h3>Project Links</h3>
|
|||
|
<ul>
|
|||
|
<li><a href="https://github.com/return42/searx">Source</a>
|
|||
|
|
|||
|
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
|
|||
|
|
|||
|
<li><a href="https://searx.space/">Public instances</a>
|
|||
|
|
|||
|
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
|
|||
|
</ul><h3>Navigation</h3>
|
|||
|
<ul>
|
|||
|
<li><a href="../index.html">Overview</a>
|
|||
|
<ul>
|
|||
|
<li><a href="index.html">Administrator documentation</a>
|
|||
|
<ul>
|
|||
|
<li>Previous: <a href="installation.html" title="previous chapter">Installation</a>
|
|||
|
<li>Next: <a href="installation-uwsgi.html" title="next chapter">uwsgi</a></ul>
|
|||
|
</li>
|
|||
|
</ul>
|
|||
|
</li>
|
|||
|
</ul>
|
|||
|
<div id="searchbox" style="display: none" role="search">
|
|||
|
<h3 id="searchlabel">Quick search</h3>
|
|||
|
<div class="searchformwrapper">
|
|||
|
<form class="search" action="../search.html" method="get">
|
|||
|
<input type="text" name="q" aria-labelledby="searchlabel" />
|
|||
|
<input type="submit" value="Go" />
|
|||
|
</form>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<script>$('#searchbox').show(0);</script>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="clearer"></div>
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="footer" role="contentinfo">
|
|||
|
© Copyright 2015-2020, Adam Tauber, Noémi Ványi.
|
|||
|
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.1.
|
|||
|
</div>
|
|||
|
<script src="../_static/version_warning_offset.js"></script>
|
|||
|
|
|||
|
</body>
|
|||
|
</html>
|