.. _installation: ############ Installation ############ ************ Requirements ************ * `Python version 2.6+ `_ * `Django version 1.5+ `_ * `south version 0.7+ `_ * `lxml python module `_ * `pycrypto python module `_ * `rrdtool python binding `_ * `sievelib python module `_ * `chardet python module `_ * `argparse python module `_ * `reversion python module `_ .. _get_modoboa: *********** Get Modoboa *********** You can choose between two options: * Use the Python package available on the `PyPI `_ * Download the sources tarball The easiest one is to install it from PyPI. Just run the following command and you're done:: $ pip install modoboa If you prefer to use the tarball, download the latest one and run the following procedure:: $ tar xzf modoboa-.tar.gz $ cd modoboa- $ python setup.py install All dependencies will be installed regardless the way you chose. The only exception concerns the RRDtool binding because there isn't any python package available, it is directly provided with the official tarball. Fortunately, all major distributions include a ready-to-use package. On Debian/Ubuntu:: $ apt-get install libcairo2-dev libpango1.0-dev librrd-dev $ apt-get install python-rrdtool `virtualenv `_ users ========================================================== When you deploy an application using virtualenv, you may have to compile some dependencies. For example, modoboa relies on lxml, which is a C python module. In order to install it, you will need to install the following requirements: * python development files * libxslt development files * libxml2 development files On a Debian like system, just run the following command:: $ apt-get install python-dev libxml2-dev libxslt-dev .. _database: ******** Database ******** Thanks to Django, Modoboa supports several databases. Depending on the one you will use, you must install the appropriate python package: * `mysqldb `_ for `MySQL `_ * `psycopg2 `_ for `PostgreSQL `_ Then, create a user and a database that will be used by Modoboa. Make sure your database is using UTF8 as a default charset. .. _deployment: ********** Deployment ********** `modoboa-admin.py`, a command line tool, let you deploy a *ready-to-use* Modoboa site using only one instruction:: $ modoboa-admin.py deploy modoboa_example --syncdb --collectstatic [--with-amavis] Just answer the few questions and you're done. You can now go to the :ref:`first_use` section. .. note:: The `--with-amavis` option must be set only if you intend to use the :ref:`amavis_frontend`. .. note:: If you plan to serve Modoboa using a URL prefix, you must change the value of the ``LOGIN_URL`` parameter to ``LOGIN_URL = '//accounts/login/'``. .. _first_use: ********* First use ********* Your installation should now have a default super administrator: * Username: ``admin`` * Password: ``password`` It is **strongly** recommended to change this password the first time you log into Modoboa. To check if your installation works, just launch the embedded HTTP server:: $ python manage.py runserver You should be able to access Modoboa at http://locahost:8000/. For a production environnement, we recommend using a stable webserver like :ref:`apache2` or :ref:`nginx-label`.