diff --git a/doc/source/sysadmin.rst b/doc/source/sysadmin.rst index ceb9978..1c7d57d 100644 --- a/doc/source/sysadmin.rst +++ b/doc/source/sysadmin.rst @@ -1,28 +1,34 @@ Sysadmin ========= +.. highlight:: bash + Installation ------------- -System dependencies -^^^^^^^^^^^^^^^^^^^^ +We only maintain packages for debian stretch. They work fine in debian jessie, +too. Still, installing libreant is easy on most distributions. -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://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' -Add elasticsearch repos in /etc/apt/sources.list.d/elasticsearch.list:: - echo "deb http://packages.elasticsearch.org/elasticsearch/1.7/debian stable main" | sudo tee /etc/apt/sources.list.d/elasticsearch.list +If you are using debian jessie, you need to add stretch repositories:: + + 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:: @@ -30,17 +36,49 @@ Install requirements:: .. _official installation guide: http://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html +Debian wheezy / Ubuntu +^^^^^^^^^^^^^^^^^^^^^^^ + +System requirements +~~~~~~~~~~~~~~~~~~~ + +Add elasticsearch repositories:: + + wget -qO - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | 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 + +Install everything:: + + sudo apt-get update && sudo apt-get install openjdk-7-jre-headless elasticsearch + +Python dependencies +~~~~~~~~~~~~~~~~~~~~ + +Clone libreant repository and create a virtual env:: + + virtualenv -p /usr/bin/python2 ve + +Install libreant and all python dependencies:: + + ./ve/bin/pip install libreant + + + Arch -~~~~~ +^^^^^ + + +System dependencies +~~~~~~~~~~~~~~~~~~~~ Install all necessary packages:: sudo pacman -Sy python2 python2-virtualenv elasticsearch Python dependencies -^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~ -Create a virtual env:: +Clone libreant repository and create a virtual env:: virtualenv -p /usr/bin/python2 ve @@ -48,7 +86,7 @@ Install libreant and all python dependencies:: ./ve/bin/pip install libreant -Execution +Running ---------- Start elsticsearch @@ -67,7 +105,7 @@ Start elasticsearch service:: sudo update-rc.d elasticsearch defaults 95 10 -Arch / Debian jessie +Arch / Debian jessie / Debian stretch ~~~~~~~~~~~~~~~~~~~~ Start elasticsearch service:: @@ -79,11 +117,19 @@ 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:: - ./ve/bin/libreant +On debian stretch, the systemd unit ``python-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