<commit_before>.. index:: installation-rhel

.. _rhel-chapter:

RHEL/CentOS 6
-------------

Install the `EPEL repository <http://fedoraproject.org/wiki/EPEL>`_ (note that
while the EPEL package is from an `i386` tree it will work on `x86_64`):
::
  sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

Install the `PostgreSQL repository <http://yum.pgrpms.org/repopackages.php>`_. 
This package will vary depending on your distribution and environment.
For example if you are running RHEL 6 on i386, you would do this:
::
  sudo rpm -ivh http://yum.postgresql.org/9.3/redhat/rhel-6-i386/pgdg-centos93-9.3-1.noarch.rpm

Install the `Elasticsearch repository <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-repositories.html>`_.
First the key:
::
  sudo rpm --import http://packages.elasticsearch.org/GPG-KEY-elasticsearch

Then the repository definition:
::
  sudo tee /etc/yum.repos.d/elasticsearch.repo >/dev/null <<EOF
  [elasticsearch-0.90]
  name=Elasticsearch repository for 0.90.x packages
  baseurl=http://packages.elasticsearch.org/elasticsearch/0.90/centos
  gpgcheck=1
  gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch
  enabled=1
  EOF

Install `Devtools 1.1 repository <http://people.centos.org/tru/devtools-1.1/readme>`_, needed for stackwalker
::
  sudo curl http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -o /etc/yum.repos.d/devtools-1.1.repo

Now you can actually install the packages:
::
  sudo yum install postgresql93-server postgresql93-plperl \
    postgresql93-contrib postgresql93-devel subversion make rsync \
    subversion gcc-c++ python-devel python-pip mercurial git \
    libxml2-devel libxslt-devel java-1.7.0-openjdk python-virtualenv \
    npm devtoolset-1.1-gcc-c++ rabbitmq-server elasticsearch httpd \
    mod_wsgi memcached daemonize

Enable Apache on startup:
::
  sudo service httpd start
  sudo chkconfig httpd on

Enable Memcached on startup:
::
  sudo service memcached start
  sudo chkconfig memcached on

Enable RabbitMQ on startup:
::
  sudo service rabbitmq-server start
  sudo chkconfig rabbitmq-server on<commit_msg>Add less to list of rhel dependencies<commit_after>.. index:: installation-rhel

.. _rhel-chapter:

RHEL/CentOS 6
-------------

Install the `EPEL repository <http://fedoraproject.org/wiki/EPEL>`_ (note that
while the EPEL package is from an `i386` tree it will work on `x86_64`):
::
  sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

Install the `PostgreSQL repository <http://yum.pgrpms.org/repopackages.php>`_. 
This package will vary depending on your distribution and environment.
For example if you are running RHEL 6 on i386, you would do this:
::
  sudo rpm -ivh http://yum.postgresql.org/9.3/redhat/rhel-6-i386/pgdg-centos93-9.3-1.noarch.rpm

Install the `Elasticsearch repository <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-repositories.html>`_.
First the key:
::
  sudo rpm --import http://packages.elasticsearch.org/GPG-KEY-elasticsearch

Then the repository definition:
::
  sudo tee /etc/yum.repos.d/elasticsearch.repo >/dev/null <<EOF
  [elasticsearch-0.90]
  name=Elasticsearch repository for 0.90.x packages
  baseurl=http://packages.elasticsearch.org/elasticsearch/0.90/centos
  gpgcheck=1
  gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch
  enabled=1
  EOF

Install `Devtools 1.1 repository <http://people.centos.org/tru/devtools-1.1/readme>`_, needed for stackwalker
::
  sudo curl http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -o /etc/yum.repos.d/devtools-1.1.repo

Now you can actually install the packages:
::
  sudo yum install postgresql93-server postgresql93-plperl \
    postgresql93-contrib postgresql93-devel subversion make rsync \
    subversion gcc-c++ python-devel python-pip mercurial nodejs-less \
    git libxml2-devel libxslt-devel java-1.7.0-openjdk \
    python-virtualenv npm devtoolset-1.1-gcc-c++ rabbitmq-server \
    elasticsearch httpd mod_wsgi memcached daemonize

Enable Apache on startup:
::
  sudo service httpd start
  sudo chkconfig httpd on

Enable Memcached on startup:
::
  sudo service memcached start
  sudo chkconfig memcached on

Enable RabbitMQ on startup:
::
  sudo service rabbitmq-server start
  sudo chkconfig rabbitmq-server on
{'fraction_non_alphanumeric': 0.11619880349746893, 'fraction_numerical': 0.02945236999539807, 'mean_word_length': 3.9229898074745186, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, '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': '89720', 'n_tokens_mistral': 1606, 'n_tokens_neox': 1491, 'n_words': 366}