Skip to content

Commit

Permalink
install docs updated to jessie and stretch
Browse files Browse the repository at this point in the history
  • Loading branch information
boyska committed Feb 16, 2016
1 parent d3aea41 commit d5d983d
Showing 1 changed file with 64 additions and 18 deletions.
82 changes: 64 additions & 18 deletions doc/source/sysadmin.rst
Original file line number Diff line number Diff line change
@@ -1,54 +1,92 @@
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::

if you have problem installing elasticsearch try to follow the `official installation guide`_

.. _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

Install libreant and all python dependencies::
./ve/bin/pip install libreant

Execution
Running
----------

Start elsticsearch
Expand All @@ -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::
Expand All @@ -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

0 comments on commit d5d983d

Please sign in to comment.