waeup.openerp
*************

Install
=======

Please note, that **only Linux-based installs** are described and actively
supported. We recommend use of Debian / Ubuntu.


Preparing the System
--------------------

Necessary packages can be installed on Debian systems like this::

  $ sudo apt-get install postgresql

Occasionally, PostgreSQL 9.1 database server cannot be started.
n order to resolve the error, you need to edit the postgresql.conf file
(located in my /etc/postgresql/9.1/main directory).
By default, the ssl is set to true and that is the reason which causes
the “meaningful” error. You need to set it to false.
[Source: http://www.jusuchyne.com/codingchyne/2010/04/postgres-could-not-load-private-key-file/]

Restart postgresql and continue with package installation::

  $ sudo apt-get install postgresql-server-dev-9.1 \
                         python2.7 python2.7-dev build-essential \
                         libldap2-dev libsasl2-dev libjpeg-dev \
                         python-virtualenv


Configuring OpenERP User on Postgres
------------------------------------

Create a new database user. This is so OpenERP has access rights to connect
to PostgreSQL and to create and drop databases. Remember what your choice
of password is here; you will need it later on::

  $ sudo su - postgres
  $ createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
  $ exit


Preparing OpenERP System User and Home Folder
---------------------------------------------

  $ sudo adduser --system --group --shell /bin/bash --home /openerp openerp

Login as OpenERP user::

  $ sudo bash
  $ su openerp
  $ cd ~


Predefining the ``eggs`` folder
-------------------------------

Create ``~/.buildout/default.cfg`` with the
following contents::

  [buildout]
  eggs-directory = /openerp/eggs


Bootstrapping the Buildout
--------------------------

Install local sandbox::

  $ virtualenv --no-site-packages py27

Activate local sandbox::

  $ source py27/bin/activate

Uninstall local setuptools and pip::

  (py27)$ pip uninstall setuptools pip

Checkout ``waeup.openerp``::

  (py27)$ svn co https://svn.waeup.org/repos/main/waeup.openerp/trunk myopenerp

Finally, perform the bootstrap with the virtualenv's Python::

  (py27)$ cd myopenerp
  (py27)$ python bootstrap.py


Running the Build
-----------------

Just run ::

  $ bin/buildout

Starting OpenERP
----------------

Just run ::

  $ bin/start_openerp