1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-19 02:40:11 +01:00

update & fix install guide after install refactor

This commit is contained in:
Noemi Vanyi 2016-01-10 20:10:53 +01:00
parent 3c862353e3
commit 08d26609a5

View File

@ -1,25 +1,28 @@
Installation 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 Source: https://about.okhin.fr/posts/Searx/ with some additions
How to: `Setup searx in a couple of hours with a free SSL 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/>`__ certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
.. contents::
:depth: 3
Basic installation Basic installation
------------------ ------------------
For Ubuntu, be sure to have enable universe repository. For Ubuntu, be sure to have enable universe repository.
Install packages : Install packages:
.. code:: sh .. code:: sh
sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev 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 .. code:: sh
@ -28,7 +31,7 @@ Install searx :
sudo useradd searx -d /usr/local/searx sudo useradd searx -d /usr/local/searx
sudo chown searx:searx -R /usr/local/searx sudo chown searx:searx -R /usr/local/searx
Install dependencies in a virtualenv : Install dependencies in a virtualenv:
.. code:: sh .. code:: sh
@ -36,8 +39,7 @@ Install dependencies in a virtualenv :
cd /usr/local/searx cd /usr/local/searx
virtualenv searx-ve virtualenv searx-ve
. ./searx-ve/bin/activate . ./searx-ve/bin/activate
pip install -r requirements.txt ./manage.sh update_packages
python setup.py install
Configuration Configuration
------------- -------------
@ -51,7 +53,7 @@ Edit searx/settings.yml if necessary.
Check Check
----- -----
Start searx : Start searx:
.. code:: sh .. code:: sh
@ -59,7 +61,7 @@ Start searx :
Go to http://localhost:8888 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 .. code:: sh
@ -73,14 +75,14 @@ twice).
uwsgi uwsgi
----- -----
Install packages : Install packages:
.. code:: sh .. code:: sh
sudo apt-get install uwsgi uwsgi-plugin-python sudo apt-get install uwsgi uwsgi-plugin-python
Create the configuration file /etc/uwsgi/apps-available/searx.ini with 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/ pythonpath = /usr/local/searx/
chdir = /usr/local/searx/searx/ chdir = /usr/local/searx/searx/
Activate the uwsgi application and restart : Activate the uwsgi application and restart:
.. code:: sh .. code:: sh
@ -126,7 +128,7 @@ with nginx
^^^^^^^^^^ ^^^^^^^^^^
If nginx is not installed (uwsgi will not work with the package If nginx is not installed (uwsgi will not work with the package
nginx-light) : nginx-light):
.. code:: sh .. code:: sh
@ -136,7 +138,7 @@ Hosted at /
""""""""""" """""""""""
Create the configuration file /etc/nginx/sites-available/searx with this Create the configuration file /etc/nginx/sites-available/searx with this
content : content:
.. code:: nginx .. code:: nginx
@ -151,7 +153,7 @@ content :
} }
} }
Restart service : Restart service:
.. code:: sh .. code:: sh
@ -159,10 +161,10 @@ Restart service :
sudo service uwsgi restart sudo service uwsgi restart
from subdirectory URL (/searx) from subdirectory URL (/searx)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """"""""""""""""""""""""""""""
Add this configuration in the server config file Add this configuration in the server config file
/etc/nginx/sites-available/default : /etc/nginx/sites-available/default:
.. code:: nginx .. code:: nginx
@ -183,7 +185,7 @@ Enable base\_url in searx/settings.yml
base_url : http://your.domain.tld/searx/ base_url : http://your.domain.tld/searx/
Restart service : Restart service:
.. code:: sh .. code:: sh
@ -195,7 +197,7 @@ disable logs
for better privacy you can disable nginx logs about searx. 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 /etc/nginx/sites-available/default add
:: ::
@ -203,23 +205,23 @@ how to proceed : below ``uwsgi_pass`` in
access_log /dev/null; access_log /dev/null;
error_log /dev/null; error_log /dev/null;
Restart service : Restart service:
.. code:: sh .. code:: sh
sudo service nginx restart sudo service nginx restart
with apache with apache
----------- ^^^^^^^^^^^
Add wsgi mod : Add wsgi mod:
.. code:: sh .. code:: sh
sudo apt-get install libapache2-mod-uwsgi sudo apt-get install libapache2-mod-uwsgi
sudo a2enmod 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 .. 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 change ``<Location />`` by the location of your instance, like
``<Location /searx>``. ``<Location /searx>``.
Restart Apache : Restart Apache:
.. code:: sh .. code:: sh
sudo /etc/init.d/apache2 restart sudo /etc/init.d/apache2 restart
disable logs disable logs
------------ """"""""""""
For better privacy you can disable Apache 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. 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 .. code:: apache
CustomLog /dev/null combined CustomLog /dev/null combined
Restart Apache : Restart Apache:
.. code:: sh .. code:: sh
@ -272,6 +274,27 @@ How to update
git stash git stash
git pull origin master git pull origin master
git stash apply git stash apply
pip install --upgrade -r requirements.txt ./manage.sh update_packages
sudo service uwsgi restart 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 .