<commit_before>= Installing from Pip =

GRR is now available from link:https://pip.pypa.io/en/stable/installing/[pip].
If you're looking for an install that sets up system daemons and everything
ready for production, use the deb package via the
link:quickstart.adoc[quickstart] instuctions. Use these instructions to set up a
dev environment or upgrade a server to a newer version from github.

The packages are:

- Server:
  link:https://pypi.python.org/pypi/grr-response-server[grr-response-server]
- Client:
  link:https://pypi.python.org/pypi/grr-response-templates[grr-response-client]
- Client templates and components:
  link:https://pypi.python.org/pypi/grr-response-templates[grr-response-templates]

To install the version released on pypi (the deb and
rpm packaging stuff is only needed for the server to repack the client
installers). Note that you *must* upgrade pip and run in a virutalenv for the install to work:

----
sudo apt-get install debhelper \
dpkg-dev \
libssl-dev \
prelink \
python-dev \
python-pip \
rpm

sudo pip install --upgrade pip
sudo pip install virtualenv

virtualenv GRR_ENV
source GRR_ENV/bin/activate
pip install grr-response-server
pip install -f https://storage.googleapis.com/releases.grr-response.com/index.html grr-response-templates

# Then run initialize as normal
grr_config_updater initialize
----

Installing the client for development is just as easy thanks to pre-built wheels
hosted on pypi for OS X and Windows:

----
virtualenv GRR_ENV
source GRR_ENV/bin/activate
pip install --pre grr-response-client
----

== Installing GRR server for dev, i.e. tracking HEAD ==

Installing from pip is great for development because you can have
multiple versions installed on the same machine without having them conflict
with each other. When you use pip "--editable" mode your installed version will
be linked to your src tree so you can git clone from github, install, edit, and
have any changes reflected immediately in your installed server.

Even if you're not doing development you may want to upgrade your GRR server to
use a commit from github to grab a bugfix or a new feature that isn't in a
release yet. Once you have installed the deb (note it needs to be 3.1.0-rc2 or newer) you can then grab the packages for
linux listed above and:

----
git clone https://github.com/google/grr.git
virtualenv GRR_NEW
source GRR_NEW/bin/activate
cd grr/
pip install --editable .
pip install --editable grr/config/grr-response-server
pip install -f https://storage.googleapis.com/releases.grr-response.com/index.html grr-response-templates
pip install --editable grr/config/grr-response-test
----
Then edit /etc/default/grr and set:

----
GRR_PREFIX=/path/to/GRR_NEW
----<commit_msg>Add packages to install HEAD instructions<commit_after>= Installing from Pip =

GRR is now available from link:https://pip.pypa.io/en/stable/installing/[pip].
If you're looking for an install that sets up system daemons and everything
ready for production, use the deb package via the
link:quickstart.adoc[quickstart] instuctions. Use these instructions to set up a
dev environment or upgrade a server to a newer version from github.

The packages are:

- Server:
  link:https://pypi.python.org/pypi/grr-response-server[grr-response-server]
- Client:
  link:https://pypi.python.org/pypi/grr-response-templates[grr-response-client]
- Client templates and components:
  link:https://pypi.python.org/pypi/grr-response-templates[grr-response-templates]

To install the version released on pypi (the deb and
rpm packaging stuff is only needed for the server to repack the client
installers). Note that you *must* upgrade pip and run in a virutalenv for the install to work:

----
sudo apt-get install debhelper \
dpkg-dev \
libssl-dev \
prelink \
python-dev \
python-pip \
rpm

sudo pip install --upgrade pip
sudo pip install virtualenv

virtualenv GRR_ENV
source GRR_ENV/bin/activate
pip install grr-response-server
pip install -f https://storage.googleapis.com/releases.grr-response.com/index.html grr-response-templates

# Then run initialize as normal
grr_config_updater initialize
----

Installing the client for development is just as easy thanks to pre-built wheels
hosted on pypi for OS X and Windows:

----
virtualenv GRR_ENV
source GRR_ENV/bin/activate
pip install --pre grr-response-client
----

== Installing GRR server for dev, i.e. tracking HEAD ==

Installing from pip is great for development because you can have
multiple versions installed on the same machine without having them conflict
with each other. When you use pip "--editable" mode your installed version will
be linked to your src tree so you can git clone from github, install, edit, and
have any changes reflected immediately in your installed server.

Even if you're not doing development you may want to upgrade your GRR server to
use a commit from github to grab a bugfix or a new feature that isn't in a
release yet. Once you have installed the deb (note it needs to be 3.1.0-rc2 or newer):

----
sudo apt-get install debhelper \
dpkg-dev \
libssl-dev \
prelink \
python-dev \
python-pip \
rpm

sudo pip install --upgrade pip
sudo pip install virtualenv

git clone https://github.com/google/grr.git
virtualenv GRR_NEW
source GRR_NEW/bin/activate
cd grr/
pip install --editable .
pip install --editable grr/config/grr-response-server
pip install -f https://storage.googleapis.com/releases.grr-response.com/index.html grr-response-templates
pip install --editable grr/config/grr-response-test
----
Then edit /etc/default/grr and set:

----
GRR_PREFIX=/path/to/GRR_NEW
----
{'fraction_non_alphanumeric': 0.08312387791741473, 'fraction_numerical': 0.001436265709156194, 'mean_word_length': 3.9964125560538117, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '69806', 'n_tokens_mistral': 1706, 'n_tokens_neox': 1621, 'n_words': 673}