<commit_before># Quick Start

## 1. Setup

Basically, ODENOS runs with redis-server and Java. If you want to use
Python or Ruby environment, please see "Appendix A".

### 1-1. redis-server

1. Install redis-server(version >= 2.8.4)

   ```
   $ sudo apt-get install redis-server
   ```

2. Edit the following parameters in */etc/redis/redis.conf*
   * bind 0.0.0.0
   * timeout 0
   * client-output-buffer-limit pubsub 256mb 256mb 60

3. Restart redis-server

   ```
   $ sudo service redis-server restart
   ```

### 1-2. Java Environment

1. Install jdk and maven

   ```
   $ sudo apt-get install git maven openjdk-7-jdk curl
   $ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
   ```

   If using java-1.8, please use Oracle JDK instead of OpenJDK.
   The first, download a JDK-8 archive from
   [Java SE - Downloads](http://www.oracle.com/technetwork/java/javase/downloads/index.html),
   and then install its.

   ```
   $ tar xf jdk-8u25-linux-x64.tar.gz -C /usr/lib/jvm
   $ ln -s jdk1.8.0_25 /usr/lib/jvm/java-8-oracle
   $ export JAVA_HOME=/usr/lib/jvm/java-8-oracle
   ```

### 1-3. syslog setting
If syslog output, set syslog configuration.

1. Install rsyslog package

   ```
   $ sudo apt-get install rsyslog
   ```

2. Add the file *odenos/etc/80-odenos.conf* into */etc/rsyslog.d/*

3. Enable the parameters ModLoad in */etc/rsyslog.conf* for java logging.

   ```
   $ModLoad imudp
   $UDPServerRun 514
   ```

4. To suppress ODENOS log output to default. Edit the file */etc/rsyslog.d/50-default.conf*, as following:

   ```
   *.*;auth,authpriv.none,local1.none -/var/log/syslog
   ```

4. Restart rsyslog

   ```
   $ sudo service rsyslog restart
   ```

## 2. Build, Run, Test

1. git clone

   ```
   $ git clone https://github.com/o3project/odenos.git
   $ cd odenos
   ```

2. Build

   ```
   $ mvn package
   ```

3. Start odenos

   ```
   $ ./odenos start<commit_msg>Modified syslog setting description in QUICKSTART.md.<commit_after># Quick Start

## 1. Setup

Basically, ODENOS runs with redis-server and Java. If you want to use
Python or Ruby environment, please see "Appendix A".

### 1-1. redis-server

1. Install redis-server(version >= 2.8.4)

   ```
   $ sudo apt-get install redis-server
   ```

2. Edit the following parameters in */etc/redis/redis.conf*
   * bind 0.0.0.0
   * timeout 0
   * client-output-buffer-limit pubsub 256mb 256mb 60

3. Restart redis-server

   ```
   $ sudo service redis-server restart
   ```

### 1-2. Java Environment

1. Install jdk and maven

   ```
   $ sudo apt-get install git maven openjdk-7-jdk curl
   $ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
   ```

   If using java-1.8, please use Oracle JDK instead of OpenJDK.
   The first, download a JDK-8 archive from
   [Java SE - Downloads](http://www.oracle.com/technetwork/java/javase/downloads/index.html),
   and then install its.

   ```
   $ tar xf jdk-8u25-linux-x64.tar.gz -C /usr/lib/jvm
   $ ln -s jdk1.8.0_25 /usr/lib/jvm/java-8-oracle
   $ export JAVA_HOME=/usr/lib/jvm/java-8-oracle
   ```

### 1-3. syslog setting
If you want to output syslog, set syslog configuration.

1. Install rsyslog package

   ```
   $ sudo apt-get install rsyslog
   ```

2. Add the file *odenos/etc/80-odenos.conf* into */etc/rsyslog.d/*.

3. Enable *ModLoad* parameter in */etc/rsyslog.conf* for java logging.

   ```
   $ModLoad imudp
   $UDPServerRun 514
   ```

4. To suppress ODENOS log output to default, Edit the file */etc/rsyslog.d/50-default.conf*.
   For example as following:

   ```
   *.*;auth,authpriv.none,local1.none -/var/log/syslog
   ```

4. Restart rsyslog

   ```
   $ sudo service rsyslog restart
   ```

## 2. Build, Run, Test

1. git clone

   ```
   $ git clone https://github.com/o3project/odenos.git
   $ cd odenos
   ```

2. Build

   ```
   $ mvn package
   ```

3. Start odenos

   ```
   $ ./odenos start
{'fraction_non_alphanumeric': 0.13797566658037794, 'fraction_numerical': 0.033134869272586076, 'mean_word_length': 2.6315789473684212, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6390912', 'n_tokens_mistral': 1535, 'n_tokens_neox': 1415, 'n_words': 392}