Documentation

Documentation.Install-DBDeployment-3-0 History

Hide minor edits - Show changes to markup

June 14, 2019, at 03:57 PM by liviu -
Changed line 46 from:

You can also create a different database, for example opensips_test, directly from cli using:

to:

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

June 14, 2019, at 03:55 PM by liviu -
Changed line 19 from:

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

to:

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

June 13, 2019, at 01:37 PM by razvancrainea -
Changed lines 19-39 from:

Configuring DB Credentials

Go to the [Install_Path]/etc/opensips/ folder and open the opensipsctlrc file

There take care of the following lines :

  • DBENGINE=
    • the currently available options MYSQL, PGSQL, ORACLE, DB_BERKELEY, or DBTEXT
  • DBHOST=
    • enter the host for your DB engine
  • DBPORT=
    • enter the port for your DB engine
  • DBNAME=
    • the name of the database which will be created
  • DBRWUSER=
    • the username that will be created in the database for OpenSIPS read/write access
  • DBRWPW=
    • the password that will be set for the DBRWUSER username
  • DBROOTUSER=
    • the user that will be used for creating the database, tables and DBRWUSER
to:

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

Configuring OpenSIPS CLI

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

  • database_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 too 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.

Changed line 36 from:

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

to:

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

Changed line 38 from:

[Install_Path]/sbin/opensipsdbctl create

to:

opensips-cli -x database create

Changed lines 41-43 from:

When prompted by the opensipsdbctl tool, please enter your DBROOTUSER password.

If you want to create a different database other than the default DBNAME, you can call

to:

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

Changed line 43 from:

[Install_Path]/sbin/opensipsdbctl create my_custom_db_name

to:

opensips-cli -x database add presence

Changed line 46 from:

The opensipsdbctl tool can also be used for things like taking backups, doing restores, and more. If you want to see the capabilities and help manual for the opensipsdbctl tool, you can run it with no parameters :

to:

You can also create a different database, for example opensips_test, directly from cli using:

Changed line 48 from:

[Install_Path]/sbin/opensipsdbctl

to:

opensips-cli -x database create opensips_test

July 22, 2014, at 02:32 AM by norm -
Added lines 29-30:
  • DBPORT=
    • enter the port for your DB engine
March 20, 2014, at 08:04 PM by razvancrainea -
Added lines 1-55:
Documentation -> Manuals -> Manual 3.0 -> Database Deployment

(:title Database Deployment - 3.0:)


(:allVersions Install-DBDeployment 3.0:)


Database Deployment v3.0
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 ).


(:toc-float Table of Content:)

Configuring DB Credentials

Go to the [Install_Path]/etc/opensips/ folder and open the opensipsctlrc file

There take care of the following lines :

  • DBENGINE=
    • the currently available options MYSQL, PGSQL, ORACLE, DB_BERKELEY, or DBTEXT
  • DBHOST=
    • enter the host for your DB engine
  • DBNAME=
    • the name of the database which will be created
  • DBRWUSER=
    • the username that will be created in the database for OpenSIPS read/write access
  • DBRWPW=
    • the password that will be set for the DBRWUSER username
  • DBROOTUSER=
    • the user that will be used for creating the database, tables and DBRWUSER

Creating the Database

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

[Install_Path]/sbin/opensipsdbctl create

When prompted by the opensipsdbctl tool, please enter your DBROOTUSER password.

If you want to create a different database other than the default DBNAME, you can call

[Install_Path]/sbin/opensipsdbctl create my_custom_db_name

The opensipsdbctl tool can also be used for things like taking backups, doing restores, and more. If you want to see the capabilities and help manual for the opensipsdbctl tool, you can run it with no parameters :

[Install_Path]/sbin/opensipsdbctl

Page last modified on June 14, 2019, at 03:57 PM