<commit_before>.. _quickstart:

Quickstart guide
================

Vagrant
-------

We have a vagrant setup for debian wheezy and ubuntu trusty (currently disfuctional). If you have vagrant you can just 
checkout the git repo, go to vagrant/debian and run "vagrant up test". Provisioning takes some
minutes and will give you a ready to run OXI install available at http://localhost:8080/newoxi/.

Debian/Ubuntu Development Builds
---------------------------------

**Starting with the 0.15 release we will no longer support the old mason ui, the current 0.18 release includes a useable but still a bit ugly version of the new ui component based on the Ember.js framework**

**Packages are for 64bit systems (arch amd64), make sure that the en_US.utf8 locale is installed as the translation stuff might crash otherwise!**

Current release is 0.18 which is out for debian wheezy on the package mirror at http://packages.openxpki.org/. 

Add the repository to your source list (wheezy)::

    echo "deb http://packages.openxpki.org/debian/ wheezy release" > /etc/apt/sources.list.d/openxpki.list
    aptitude update   
    
or ubuntu **temporary discontinued due to package problems**::

    echo "deb http://packages.openxpki.org/ubuntu/ trusty/release/" > /etc/apt/sources.list.d/openxpki.list
    aptitude update

As the init script uses mysql as default, but does not force it as a dependancy, it is crucial that you have the mysql server and the perl mysql binding installed before you pull the OpenXPKI package::

    aptitude install mysql-server libdbd-mysql-perl
    aptitude install libopenxpki-perl

We are fighting with a stupid debian build issue, if your install complains about a file collision in ``perllocal.pod``, add the force option::

    aptitude -o Dpkg::Options::="--force-overwrite" install libopenxpki-perl

If the install was successful, you should see the result of the initial config import at the bottom of your install log (the hash value might vary)::

    Current Tree Version: 64f82c3479f5773536f9ff7d37da366ea49abae9

Now, create the database user::

    CREATE database openxpki;
    CREATE USER 'openxpki'@'localhost' IDENTIFIED BY 'openxpki';
    GRANT ALL ON openxpki.* TO 'openxpki'@'localhost';
    flush privileges;

It is now time to init the server::

    openxpkiadm loadcfg
    openxpkiadm initdb
<commit_msg>Add hint on i18n package to quickstart<commit_after>.. _quickstart:

Quickstart guide
================

Vagrant
-------

We have a vagrant setup for debian wheezy and ubuntu trusty (currently disfuctional). If you have vagrant you can just 
checkout the git repo, go to vagrant/debian and run "vagrant up test". Provisioning takes some
minutes and will give you a ready to run OXI install available at http://localhost:8080/newoxi/.

Debian/Ubuntu Development Builds
---------------------------------

**Starting with the 0.15 release we will no longer support the old mason ui, the current 0.18 release includes a useable but still a bit ugly version of the new ui component based on the Ember.js framework**

**Packages are for 64bit systems (arch amd64), make sure that the en_US.utf8 locale is installed as the translation stuff might crash otherwise!**

Current release is 0.18 which is out for debian wheezy on the package mirror at http://packages.openxpki.org/. 

Add the repository to your source list (wheezy)::

    echo "deb http://packages.openxpki.org/debian/ wheezy release" > /etc/apt/sources.list.d/openxpki.list
    aptitude update   
    
or ubuntu **temporary discontinued due to package problems**::

    echo "deb http://packages.openxpki.org/ubuntu/ trusty/release/" > /etc/apt/sources.list.d/openxpki.list
    aptitude update

As the init script uses mysql as default, but does not force it as a dependency, it is crucial that you have the mysql server and the perl mysql binding installed before you pull the OpenXPKI package::

    aptitude install mysql-server libdbd-mysql-perl

Now install the OpenXPKI core package and the translation package::

    aptitude install libopenxpki-perl openxpki-i18n

We are fighting with a stupid debian build issue, if your install complains about a file collision in ``perllocal.pod``, add the force option::

    aptitude -o Dpkg::Options::="--force-overwrite" install libopenxpki-perl

If the install was successful, you should see the result of the initial config import at the bottom of your install log (the hash value might vary)::

    Current Tree Version: 64f82c3479f5773536f9ff7d37da366ea49abae9

Now, create the database user::

    CREATE database openxpki;
    CREATE USER 'openxpki'@'localhost' IDENTIFIED BY 'openxpki';
    GRANT ALL ON openxpki.* TO 'openxpki'@'localhost';
    flush privileges;

It is now time to init the server::

    openxpkiadm loadcfg
    openxpkiadm initdb

{'fraction_non_alphanumeric': 0.08664034905464367, 'fraction_numerical': 0.018699355911074175, 'mean_word_length': 3.790049751243781, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1258505', 'n_tokens_mistral': 1471, 'n_tokens_neox': 1331, 'n_words': 617}