This section describes the installation of the web interface (a Django project).
First of all, we recommand the following context:
The following example illustrates how to realize this (Debian like system):
> sudo apt-get install python-virtualenv python-pip
> sudo useradd modoboa
> sudo -i modoboa
> virtualenv env
(env)> source env/bin/activate
(env)> pip install -U pip
FIXME: dépendances système pour compilation
Then, install Modoboa:
(env)> pip install modoboa
Warning
This documentation does not cover the installation of a database server but only the setup of a functional database that Modoboa will use.
Thanks to Django, Modoboa is compatible with the following databases:
Since the last one does not require particular actions, only the first two ones are described.
Install the corresponding Python binding:
(env)> pip install psycopg2
Then, create a user and a database:
> sudo -i postgres
>
Install the corresponding Python binding:
(env)> pip install MySQL-Python
Then, create a user and a database:
> mysqladmin -u root -p create modoboa
modoboa-admin.py, a command line tool, lets you deploy a ready-to-use Modoboa site using only one instruction:
(env)> modoboa-admin.py deploy instance --collectstatic \
--domain <hostname of your server> --dburl default:database-url
Note
You can install additional extensions during the deploy process. To do so, use the --extensions option which accepts a list of names as argument (--extensions ext1 ext2 ...). If you want to install all extensions, just use the all keyword like this --extensions all.
If you choose to install extensions one at a time, you will have to add their names in settings.py to MODOBOA_APPS. Also ensure that you have the line from modoboa_amavis.settings import * at the end of this file.
The list of available extensions can be found on the index page. Instructions to install them are available on each extensions page.
Note
You can specify more than one database connection using the --dburl option. Multiple connections are differentiated by a prefix.
The primary connection must use the default: prefix (as shown in the example above). For the amavis extension, use the amavis: prefix. For example: --dburl default:<database url> amavis:<database url>.
A database url should meet the following syntax <mysql|postgres>://[user:pass@][host:port]/dbname OR sqlite:////full/path/to/your/database/file.sqlite.
The command will ask you a few questions, answer them and you’re done.
If you need a silent installation (e.g. if you’re using Salt-Stack, Ansible or whatever), it’s possible to supply the database credentials as commandline arguments.
You can consult the complete option list by running the following command:
$ modoboa-admin.py help deploy
Now you can continue to the Web server section.