filtron.sh.rst 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. .. _filtron.sh:
  2. ====================
  3. ``utils/filtron.sh``
  4. ====================
  5. .. sidebar:: further reading
  6. - :ref:`installation`
  7. - :ref:`searx filtron`
  8. - :ref:`architecture`
  9. .. _Go: https://golang.org/
  10. .. _filtron: https://github.com/asciimoo/filtron
  11. .. _filtron README: https://github.com/asciimoo/filtron/blob/master/README.md
  12. To simplify installation and maintenance of a filtron instance you can use the
  13. script :origin:`utils/filtron.sh`. In most cases you will install filtron_
  14. simply by running the command:
  15. .. code:: bash
  16. sudo -H ./utils/filtron.sh install all
  17. The script adds a ``${SERVICE_USER}`` (default:``filtron``) and installs filtron_
  18. into this user account:
  19. #. Create a separated user account (``filtron``).
  20. #. Download and install Go_ binary in user's $HOME (``~filtron``).
  21. #. Install filtron with the package management from Go_ (``go get -v -u
  22. github.com/asciimoo/filtron``)
  23. #. Setup a proper rule configuration :origin:`[ref]
  24. <utils/templates/etc/filtron/rules.json>` (``/etc/filtron/rules.json``).
  25. #. Setup a systemd service unit :origin:`[ref]
  26. <utils/templates/lib/systemd/system/filtron.service>`
  27. (``/lib/systemd/system/filtron.service``).
  28. Create user
  29. ===========
  30. .. include:: ../../build/docs/includes/filtron.rst
  31. :start-after: START create user
  32. :end-before: END create user
  33. Install go
  34. ==========
  35. .. include:: ../../build/docs/includes/filtron.rst
  36. :start-after: START install go
  37. :end-before: END install go
  38. Install filtron
  39. ===============
  40. Install :origin:`rules.json <utils/templates/etc/filtron/rules.json>` at
  41. ``/etc/filtron/rules.json`` (see :ref:`Sample configuration of filtron`) and
  42. install filtron software and systemd unit:
  43. .. include:: ../../build/docs/includes/filtron.rst
  44. :start-after: START install filtron
  45. :end-before: END install filtron
  46. .. include:: ../../build/docs/includes/filtron.rst
  47. :start-after: START install systemd unit
  48. :end-before: END install systemd unit
  49. .. _filtron.sh overview:
  50. Overview
  51. ========
  52. The ``--help`` output of the script is largely self-explanatory
  53. (:ref:`toolboxing common`):
  54. .. program-output:: ../utils/filtron.sh --help
  55. .. _reverse proxy:
  56. Public Reverse Proxy
  57. ====================
  58. To install searx in your public HTTP server use:
  59. .. code:: bash
  60. sudo -H ./utils/filtron.sh apache install
  61. .. tabs::
  62. .. group-tab:: apache
  63. .. literalinclude:: ../../utils/templates/etc/apache2/sites-available/searx.conf:filtron
  64. :language: apache
  65. .. tabs::
  66. .. group-tab:: Ubuntu / debian
  67. .. code-block:: sh
  68. $ sudo -H a2enmod headers
  69. $ sudo -H a2enmod proxy
  70. $ sudo -H a2enmod proxy_http