<commit_before>Getting Started
===============

Estimated time to complete: 3/4 hours.

.. contents::


Requirements
------------

.. Keep in sync with sysadmin/requirements.rst

- `Apache 2 <https://httpd.apache.org/>`__ with:

  - ``mod_proxy``. To enable ``mod_proxy`` on Debian based systems, use ``a2enmod proxy``
  - ``mod_rewrite``. To enable ``mod_rewrite`` on Debian based systems, use ``a2enmod rewrite``
  - ``mod_expires``. To enable ``mod_expires`` on Debian based systems, use ``a2enmod expires``
  - ``mod_headers``. To enable ``mod_headers`` on Debian based systems, use ``a2enmod headers``
  - ``mod_fcgid``. To enable ``mod_fcgid`` on Debian based systems install the ``libapache2-mod-fcgid`` package (``aptitude install libapache2-mod-fcgid``)
  - ``mod_proxy``, ``mod_proxy_ajp`` and ``mod_proxy_http``. To enable ``mod_proxy``, ``mod_proxy_ajp`` and ``mod_proxy_http`` on Debian based systems, use ``a2enmod proxy``, ``a2enmod proxy_ajp`` and ``a2enmod proxy_http``.

- `Python <https://www.python.org/>`__ 3.4 or above with virtualenv capabilities (probably in the ``python3-venv`` package)
- `nodejs <http://nodejs.org/>`__ 5.0 or above
- `MapServer <http://mapserver.org/>`__ 6.4.3+ (it will not work with 6.4.1) or 7.0.1+ (package commonly named ``mapserver`` on most distributions, on Debian based system, use ``cgi-mapserver`` and ``mapserver-bin``)
- `GDAL <http://www.gdal.org>`__ 2.0 or above with Python3 bindings
- `Sphinx search <http://sphinxsearch.com/>`__ or above for the search features (package commonly named ``sphinx`` on most distributions, on Debian system, use ``sphinxsearch`` in Jessie backports)
- `tomcat <http://tomcat.apache.org/>`__ 8.0 or above to deploy the print component
- `Bash <http://www.gnu.org/software/bash>`__ 4 or above to launch the tasks
- `git <https://git-scm.com/>`__ 2.1 or above to get the code
- sudo to launch some commands with your normal user. Your ``/etc/sudoers`` file must contains the following lines (edit it with ``visudo``):

  ::

    USER ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart httpd.service  # Or /bin/systemctl restart apache2.service on Debian based system
    USER ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart searchd@customer-infra.service # Or /bin/systemctl restart searchd@customer-infra.service on Debian based system
    USER ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart tomcat.service # Or /bin/systemctl restart tomcat.service on Debian based system
    USER ALL=(ALL) NOPASSWD: /bin/systemctl restart tomcat8.service  # Debian based system only, in addition to the previous line.
    USER ALL=(ALL) NOPASSWD: /usr/bin/indexer --verbose --rotate --config /etc/sphinx/customer-infra.conf --all --quiet
    USER ALL=(ALL) NOPASSWD: /usr/bin/indexer --verbose --rotate --config /etc/sphinx/customer-infra.conf --all
    USER ALL=(ALL) NOPASSWD: /usr/sbin/apachectl -t

- The following libraries to correctly create the python venv: geos, geos-devel, postgresql-devel, libxml2-devel, libxslt-devel. On debian based system, use this list: libgeos-c1, libgeos-dev, python3-pip (needed to create the virtualenv for the API), libxml2-dev, libxslt-dev.


Before we start
---------------<commit_msg>Correct required librarie in the getting started<commit_after>Getting Started
===============

Estimated time to complete: 3/4 hours.

.. contents::


Requirements
------------

.. Keep in sync with sysadmin/requirements.rst

- `Apache 2 <https://httpd.apache.org/>`__ with:

  - ``mod_proxy``. To enable ``mod_proxy`` on Debian based systems, use ``a2enmod proxy``
  - ``mod_rewrite``. To enable ``mod_rewrite`` on Debian based systems, use ``a2enmod rewrite``
  - ``mod_expires``. To enable ``mod_expires`` on Debian based systems, use ``a2enmod expires``
  - ``mod_headers``. To enable ``mod_headers`` on Debian based systems, use ``a2enmod headers``
  - ``mod_fcgid``. To enable ``mod_fcgid`` on Debian based systems install the ``libapache2-mod-fcgid`` package (``aptitude install libapache2-mod-fcgid``)
  - ``mod_proxy``, ``mod_proxy_ajp`` and ``mod_proxy_http``. To enable ``mod_proxy``, ``mod_proxy_ajp`` and ``mod_proxy_http`` on Debian based systems, use ``a2enmod proxy``, ``a2enmod proxy_ajp`` and ``a2enmod proxy_http``.

- `Python <https://www.python.org/>`__ 3.4 or above with virtualenv capabilities (probably in the ``python3-venv`` package)
- `nodejs <http://nodejs.org/>`__ 5.0 or above
- `MapServer <http://mapserver.org/>`__ 6.4.3+ (it will not work with 6.4.1) or 7.0.1+ (package commonly named ``mapserver`` on most distributions, on Debian based system, use ``cgi-mapserver`` and ``mapserver-bin``)
- `GDAL <http://www.gdal.org>`__ 2.0 or above with Python3 bindings
- `Sphinx search <http://sphinxsearch.com/>`__ or above for the search features (package commonly named ``sphinx`` on most distributions, on Debian system, use ``sphinxsearch`` in Jessie backports)
- `tomcat <http://tomcat.apache.org/>`__ 8.0 or above to deploy the print component
- `Bash <http://www.gnu.org/software/bash>`__ 4 or above to launch the tasks
- `git <https://git-scm.com/>`__ 2.1 or above to get the code
- sudo to launch some commands with your normal user. Your ``/etc/sudoers`` file must contains the following lines (edit it with ``visudo``):

  ::

    USER ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart httpd.service  # Or /bin/systemctl restart apache2.service on Debian based system
    USER ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart searchd@customer-infra.service # Or /bin/systemctl restart searchd@customer-infra.service on Debian based system
    USER ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart tomcat.service # Or /bin/systemctl restart tomcat.service on Debian based system
    USER ALL=(ALL) NOPASSWD: /bin/systemctl restart tomcat8.service  # Debian based system only, in addition to the previous line.
    USER ALL=(ALL) NOPASSWD: /usr/bin/indexer --verbose --rotate --config /etc/sphinx/customer-infra.conf --all --quiet
    USER ALL=(ALL) NOPASSWD: /usr/bin/indexer --verbose --rotate --config /etc/sphinx/customer-infra.conf --all
    USER ALL=(ALL) NOPASSWD: /usr/sbin/apachectl -t

- The following libraries to correctly create the python venv: geos, geos-devel, postgresql-devel, libxml2-devel, libxslt-devel. On debian based system, use this list: libgeos-c1, libgeos-dev, libxml2-dev, libxslt-dev.


Before we start
---------------
{'fraction_non_alphanumeric': 0.14814814814814814, 'fraction_numerical': 0.012397991211550533, 'mean_word_length': 4.110665597433841, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 6, 'lorem ipsum': 0, 'www.': 6, 'xml': 4}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2098198', 'n_tokens_mistral': 2166, 'n_tokens_neox': 2026, 'n_words': 685}