==============
 Installation
==============

Prerequisites
=============

You only need Python 2.5. (Other python versions are currently not
supported.)

Install
=======

CAUTION: icemac.addressbook can't be installed using ``easy_install``,
you have to follow these simple steps:

1. Download the source distribution (see Download_).

2. Extract the downloaded file.

3. Run ``install.py`` using your desired python, e. g.::

   $ python2.5 install.py

4. Answer the questions about admin user name, password and so on.

Neither you need any root privileges nor it installs anything outside
its directory.

Run the tests
=============

Run the unit tests and functional tests using::

  $ bin/test

Run the application
===================

To run the application instance in foreground start using::

  $ bin/addressbook fg

To run it as a demon process start using::

  $ bin/addressbook start

To stop the demon process call::

  $ bin/addressbook stop

The default URL is to access the application is::

  http://127.0.0.1:8080

The hostname and port for this URL are stored in ``deploy.ini``.

To log-in at this URL you need the username and password you chose
when running ``install.py``. The are stored in ``admin.zcml``.

Update
======

- Do the steps described in Install_ (use a separate directory).

- If you want to restore the previous admin password copy ``admin.zcml``
  from the old instance to the new one.

- Stop the old instance of the application.

- Create a backup of the ZODB using::

  $ bin/backup

- Copy the backup directory (``var/backups``) to the new instance.

- Restore the backup using::

  $ bin/restore

- Start the new instance of the application.
