Login | Register

Documentation

Documentation -> Manuals -> Manual devel -> Database Deployment

Pages for other versions: devel 3.5 3.4 Older versions: 3.3 3.2 3.1 3.0 2.4 2.3 2.2 2.1 1.11 1.10 1.9 1.8 1.7 1.6 1.5 1.4


Database Deployment v3.6
PrevNext

After installing your OpenSIPS, most likely you will need to also deploy a database that you could use for various reasons ( DB user authentication, persistent registrations, dialogs, etc ).


You can deploy the opensips database using the opensips-cli tool. Before you do that, you should install it.

1.  Configuring OpenSIPS CLI

Open your OpenSIPS CLI configuration file and specify the following parameters:

  • database_schema_path - (defaults to /usr/share/opensips/) set it to [Install_Path]/share/opensips/
  • database_url - the URL to connect to your database (if not specified, you will be prompted for it during deploy)
  • database_name - (defaults to opensips) the database to use
  • database_modules - (defaults to standard modules) the modules you want to deploy.

You can find more information about the OpenSIPS CLI tool configuration here.

Note: OpenSIPS CLI searches for its configuration files in ~/.opensips-cli.cfg, /etc/opensips-cli.cfg, /etc/opensips/opensips-cli.cfg, but you can also specify your own configuration file using the -f parameter.

2.  Creating the Database

In order to create the database_name database that you have provisioned above, run

opensips-cli -x database create

Later, if you decide to add a new module, for example presence, simply call:

opensips-cli -x database add presence

You can also specify a different name for the database, for example opensips_test, using:

opensips-cli -x database create opensips_test

Page last modified on November 22, 2023, at 04:57 PM