diff --git a/doc/source/sysadmin.rst b/doc/source/sysadmin.rst index 3c2085d..1c01342 100644 --- a/doc/source/sysadmin.rst +++ b/doc/source/sysadmin.rst @@ -1,31 +1,40 @@ Sysadmin ========= +.. highlight:: bash + Installation ------------- +We only maintain packages for debian stretch. They work fine in debian jessie, +too. Still, installing libreant is easy on most distributions. + System dependencies ^^^^^^^^^^^^^^^^^^^^ .. note:: In this moment we do *not* support elasticsearch v2. There are plans to do it shortly! -Debian wheezy / Debian jessie / Ubuntu +Debian jessie / Debian stretch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. highlight:: bash -Download and install the Public Signing Key for elasticsearch repo:: +You need to add two custom repositories: one for elasticsearch, the other for +libreant itself:: + + wget -qO - 'http://packages.elasticsearch.org/GPG-KEY-elasticsearch' | sudo apt-key add - + wget -qO - 'http://deb.libreant.ga/repokey.gpg' | sudo apt-key add - + echo 'deb http://packages.elasticsearch.org/elasticsearch/1.7/debian stable main' | sudo tee '/etc/apt/sources.list.d/elasticsearch.list' + echo 'deb http://deb.libreant.ga/libreant-debian/ testing/' | sudo tee '/etc/apt/sources.list.d/libreant.list' - wget -qO - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add - -Add elasticsearch repos in /etc/apt/sources.list.d/elasticsearch.list:: +If you are using debian jessie, you need to add stretch repositories:: - echo "deb http://packages.elasticsearch.org/elasticsearch/1.7/debian stable main" | sudo tee /etc/apt/sources.list.d/elasticsearch.list + echo "deb http://ftp.debian.org/debian stretch main" | sudo tee /etc/apt/sources.list.d/stretch.list -Install requirements:: +Install everything:: - sudo apt-get update && sudo apt-get install python2.7 gcc python2.7-dev python-virtualenv openjdk-7-jre-headless elasticsearch + sudo apt-get update && sudo apt-get install openjdk-7-jre-headless elasticsearch python-libreant .. note:: @@ -51,7 +60,7 @@ And take care to install elasticsearch<2.x:: Python dependencies ^^^^^^^^^^^^^^^^^^^^ -Create a virtual env:: +Clone libreant repository and create a virtual env:: virtualenv -p /usr/bin/python2 ve @@ -59,7 +68,7 @@ Install libreant and all python dependencies:: ./ve/bin/pip install libreant -Execution +Running ---------- Start elsticsearch @@ -78,8 +87,8 @@ Start elasticsearch service:: sudo update-rc.d elasticsearch defaults 95 10 -Arch / Debian jessie -~~~~~~~~~~~~~~~~~~~~ +Arch / Debian jessie / Debian stretch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start elasticsearch service:: @@ -90,11 +99,20 @@ Start elasticsearch service:: If you want to automatically start elasticsearch during bootup:: sudo systemctl enable elasticsearch + + These instructions apply both to arch and debian, but should not be needed + on debian: after the installation, elasticsearch is enabled and started + automatically. Start libreant ^^^^^^^^^^^^^^ -To execute libreant:: + +On debian stretch, the systemd unit ``libreant.service`` will take care +of starting libreant. You will find it automatically started and enabled after +the installation, so you have nothing to do. + +On debian wheezy and archlinux, this is what you need to run:: ./ve/bin/libreant