<commit_before>Setup
=====

Dependencies
------------

- Apache 2
- PHP 5.5 with SQLite3 support
- Sqlite 3.3+/MySQL
- Composer
- Elasticsearch 2.0+

Ubuntu Packages:
```
$ sudo apt-get install apache2 libapache2-mod-php php-xml php7.0-mbstring php7.0-sqlite php7.0-curl sqlite3
```

Fedora Packages:
```
$ sudo dnf install httpd php php-posix php-pdo php-xml sqlite
```

Composer:
```
$ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
```

MTA:

Here's a guide on setting up [Exim](https://www.digitalocean.com/community/tutorials/how-to-install-the-send-only-mail-server-exim-on-ubuntu-12-04).

Elasticsearch:

This guide assumes you already have an Elasticsearch cluster ingesting data from Logstash. You can use that cluster for storing 411 alerts or set up a separate cluster entirely. For the latter, here's a guide on setting up [Elasticsearch](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-elasticsearch-on-ubuntu-16-04)


Set up Apache:

Enable the `mod_rewrite` and `mod_headers` Apache modules.

Install
-------

Grab the newest [release](https://github.com/etsy/411/releases).

Set up Apache VHost:

[411.conf](/411.conf) is a sample vhost config you can use. Copy it into the appropriate directory and replace `HOSTNAME` with the hostname of the box.

Enable the `mod_rewrite` and `mod_headers` Apache modules.
```
a2enmod rewrite
a2enmod headers
```

Move the 411 directory into `/var/www`. You may have to fix permissions on the directory so that the database is writable by Apache.

Install dependencies:
```<commit_msg>Issue #138: Add note about es5x branch to setup doc<commit_after>Setup
=====

Dependencies
------------

- Apache 2
- PHP 5.5 with SQLite3 support
- Sqlite 3.3+/MySQL
- Git
- Composer
- Elasticsearch 2.0+

Ubuntu Packages:
```
$ sudo apt-get install git apache2 libapache2-mod-php php-xml php7.0-mbstring php7.0-sqlite php7.0-curl sqlite3
```

Fedora Packages:
```
$ sudo dnf install git httpd php php-posix php-pdo php-xml sqlite
```

Composer:
```
$ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
```

MTA:

Here's a guide on setting up [Exim](https://www.digitalocean.com/community/tutorials/how-to-install-the-send-only-mail-server-exim-on-ubuntu-12-04).

Elasticsearch:

This guide assumes you already have an Elasticsearch cluster ingesting data from Logstash. You can use that cluster for storing 411 alerts or set up a separate cluster entirely. For the latter, here's a guide on setting up [Elasticsearch](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-elasticsearch-on-ubuntu-16-04)


Set up Apache:

Enable the `mod_rewrite` and `mod_headers` Apache modules.

Install
-------

Grab the newest [release](https://github.com/etsy/411/releases). Make sure to grab the es5x release if you're running Elasticsearh 5+.

Set up Apache VHost:

[411.conf](/411.conf) is a sample vhost config you can use. Copy it into the appropriate directory and replace `HOSTNAME` with the hostname of the box.

Enable the `mod_rewrite` and `mod_headers` Apache modules.
```
a2enmod rewrite
a2enmod headers
```

Move the 411 directory into `/var/www`. You may have to fix permissions on the directory so that the database is writable by Apache.

Install dependencies:
```
{'fraction_non_alphanumeric': 0.11914641375222289, 'fraction_numerical': 0.026674570243034972, 'mean_word_length': 3.992603550295858, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 6, 'xml': 4}, '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': '1944248', 'n_tokens_mistral': 1211, 'n_tokens_neox': 1070, 'n_words': 368}