<commit_before>Installation
============

Installing Debian squeeze
-------------------------

Create a large partition and choose ``/var/lib/libvirt/`` as mountpoint.
It will be used as storage pool for libvirt.

The first user should be named ``insekta``, as we will refer to this name in
the documentation.

Install Debian with standard system utilities and a ssh server. We don't need
a desktop environment or anything else.

Installing Insekta's dependencies
---------------------------------

Login as root and enable ``squeeze-backports`` by editing
``/etc/apt/sources.lst``. Add::
   
   # Squeeze backports
   deb http://backports.debian.org/debian-backports squeeze-backports main

Save the file and execute ``aptitude update``. Now you can install
``libvirt``, ``qemu-kvm`` etc.::
   
   apitude install -t squeeze-backports libvirt-bin python-libvirt

This should install ``qemu-kvm`` as well because it is a recommendation of the
package ``libvirt-bin``.

Insekta is written in Python and needs some python packages::
   
   aptitude install python-psycopg2 virtualenvwrapper

Additional python packages will be installed inside a virtual environment. We
will create it now::
   
   su insekta
   mkdir ~/.virtualenvs
   mkvirtualenv insekta
   pip install django pygments creoleparser jinja2 gunicorn sphinx
   exit

Nginx will be our reverse proxy for gunicorn and PostgreSQL our database
server. We need to install both::
   
   aptitude install nginx postgresql

Dependencies are now installed :)


Configuring network
-------------------

We assume that 192.168.0.* is your local network with 192.168.0.1 being your
gateway. All domains should be reachable within the network, so everyone
inside your network can learn hacking by attacking Insekta's scenarios.

First we will set up a bridge. Stop your interface ``eth0`` by typing::
   
   ifdown eth0

Open ``/etc/network/interfaces`` in your preferred editor. You will some
definition for ``eth0`` which should look like::
   
   allow-hotplug eth0
   iface eth0 inet dhcp
<commit_msg>docs: jinja2 is not a dependency<commit_after>Installation
============

Installing Debian squeeze
-------------------------

Create a large partition and choose ``/var/lib/libvirt/`` as mountpoint.
It will be used as storage pool for libvirt.

The first user should be named ``insekta``, as we will refer to this name in
the documentation.

Install Debian with standard system utilities and a ssh server. We don't need
a desktop environment or anything else.

Installing Insekta's dependencies
---------------------------------

Login as root and enable ``squeeze-backports`` by editing
``/etc/apt/sources.lst``. Add::
   
   # Squeeze backports
   deb http://backports.debian.org/debian-backports squeeze-backports main

Save the file and execute ``aptitude update``. Now you can install
``libvirt``, ``qemu-kvm`` etc.::
   
   apitude install -t squeeze-backports libvirt-bin python-libvirt

This should install ``qemu-kvm`` as well because it is a recommendation of the
package ``libvirt-bin``.

Insekta is written in Python and needs some python packages::
   
   aptitude install python-psycopg2 virtualenvwrapper

Additional python packages will be installed inside a virtual environment. We
will create it now::
   
   su insekta
   mkdir ~/.virtualenvs
   mkvirtualenv insekta
   pip install django pygments creoleparser gunicorn sphinx
   exit

Nginx will be our reverse proxy for gunicorn and PostgreSQL our database
server. We need to install both::
   
   aptitude install nginx postgresql

Dependencies are now installed :)


Configuring network
-------------------

We assume that 192.168.0.* is your local network with 192.168.0.1 being your
gateway. All domains should be reachable within the network, so everyone
inside your network can learn hacking by attacking Insekta's scenarios.

First we will set up a bridge. Stop your interface ``eth0`` by typing::
   
   ifdown eth0

Open ``/etc/network/interfaces`` in your preferred editor. You will some
definition for ``eth0`` which should look like::
   
   allow-hotplug eth0
   iface eth0 inet dhcp

{'fraction_non_alphanumeric': 0.10548011639185258, 'fraction_numerical': 0.01066925315227934, 'mean_word_length': 3.3466807165437302, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1318114', 'n_tokens_mistral': 1172, 'n_tokens_neox': 1099, 'n_words': 512}