This section describes how to create a PostgreSQL data source name (DSN), so that Media Server can connect to your database. You must complete these steps on every Media Server host.
TIP: Create the DSN on the same machine as Media Server. If your Media Server is running on Windows, see Create a PostgreSQL DSN on Windows.
To create a PostgreSQL DSN on Linux
Install the PostgreSQL ODBC driver. For example, if you have configured the relevant yum repository:
sudo yum install postgresql11-odbc
Install unixODBC driver manager version 2.2.14 or later. For example:
sudo yum install unixODBC
Configure the ODBC driver.
odbcinst.ini
with a text editor. This file is usually in the /etc
directory.Unless there is already a section to configure the ODBC driver, add a new section and set the relevant parameters. When you configure the Data Source Name (DSN) you will need to refer to the name of this section.
Parameter | Description |
---|---|
Description | A description of the driver. |
Driver | The path of the PostgreSQL ODBC driver library. |
For example:
[PostgreSQL] Description=ODBC for PostgreSQL Driver=/usr/pgsql-11/lib/psqlodbcw.so
NOTE: You can set other parameters in this file, but these have not been tested with Media Server.
Create a Data Source Name (DSN) for Media Server to use.
odbc.ini
with a text editor. System DSNs are usually defined in /etc/odbc.ini
.Add a data source name in square brackets and configure the DSN.
Parameter | Description |
---|---|
Driver
|
The driver to use (must match the section name in odbcinst.ini ) |
ServerName
|
The IP address or hostname of the database server. |
Port
|
The database server port. |
UserName
|
The user name of the user you created for Media Server. |
Password
|
The password of the user you created for Media Server. |
Database
|
The name of the database that you created. |
ByteaAsLongVarBinary
|
You must set this parameter to IMPORTANT: If this value is not set to |
UseDeclareFetch
|
(Optional) Micro Focus recommends setting this parameter to 1 , to reduce memory use. |
For example:
[MediaServerPSQL] Driver=PostgreSQL ServerName=host.example.com Port=5432 UserName=mediaserver Password=password Database=mediatraining ByteaAsLongVarBinary=1 UseDeclareFetch=1
NOTE: You can set other parameters in this file, but these have not been tested with Media Server.
You can now configure Media Server to connect to the database (see Configure Media Server).
|