Linux DSN Configuration
This section describes how to set up ODBC connectivity and configure DSNs on several Linux distributions: Debian-based systems, like Ubuntu, and Red Hat Linux platforms, like Red Hat Enterprise Linux (RHEL) and Fedora.
Minimum Linux Versions
Here are the minimum supported versions for Red Hat-based and Debian-based systems:
OS | Min. Version |
Ubuntu | 18.04 |
Debian | 10 |
RHEL | 8 |
Fedora | 28 |
SUSE | 15 |
Installing the Driver Dependencies
Run the following commands as root or with sudo to install the necessary dependencies:
- Debian/Ubuntu:
apt-get install libc6 libstdc++6 zlib1g libgcc1
- RHEL/Fedora:
yum install glibc libstdc++ zlib libgcc
Installing the Driver
You can use standard package management systems to install the driver.
On Debian-based systems, like Ubuntu, run the following command with root or sudo:
dpkg -i /path/to/driver/setup/SuiteCRMODBCDriverforUnix.deb
On systems that support the RPM package format, run the following command with root or sudo:
rpm -ivh /path/to/driver/SuiteCRMODBCDriverforUnix.rpm
Licensing the Driver
Run the following commands to license the driver. To activate a trial, omit the <key> input.
cd /opt/cdata/cdata-odbc-driver-for-suitecrm/bin/
sudo ./install-license.sh <key>
Connecting through the Driver Manager
The driver manager loads the driver and passes function calls from the application to the driver. You need to register the driver with the driver manager and you define DSNs in the driver manager's configuration files.
The driver installation registers the driver with the unixODBC driver manager and creates a system DSN. The unixODBC driver manager can be used from Python and from many other applications. Your application may embed another driver manager.
Creating the DSN
See Using unixODBC to install unixODBC and configure DSNs. See Using the DataDirect Driver Manager to create a DSN to connect to OBIEE, Informatica, and SAS.
Connecting to SuiteCRM
Requirements for connecting to SuiteCRM differ, depending on which version of the API your site is running.
SuiteCRM V4.1 API
To connect to SuiteCRM data via the V4.1 API, set these connection properties:
- Schema: suitecrmv4.
- Url: The URL associated with the SuiteCRM application. For example, http://suite.crm.com.
- User: The user associated with the SuiteCRM account.
- Password: The password associated with the user of the SuiteCRM account.
Note that retrieving SuiteCRM metadata can be expensive. We recommend that you store the metadata locally, as described in Caching Metadata.
SuiteCRM V8 API
SuiteCRM V8 uses the OAuth2 authentication standard. Before you connect to SuiteCRM V8 API, you must ensure that is it properly configured to provide the OAuth2 private and public keys. For further information, see the SuiteCRM Developer Guide API V8 setup instructions.
Authenticating to SuiteCRM V8 API
The SuiteCRM V8 API uses OAuth2.0 as its authentication mechanism, based on either of two grant types: PASSWORD and CLIENT.Authentication via OAuth requires the Schema to be set to suitecrmv8, and the creation of a custom OAuth application, as described in Creating a Custom OAuth Application.
Client Credentials Grant
To connect to SuiteCRM V8 API, set these properties:
- Schema: suitecrmv8.
- AuthScheme: OAuthClient.
- OAuthClientId: The client key returned during custom OAuth application creation. (See Creating a Custom OAuth Application.)
- OAuthClientSecret: The client secret returned during custom OAuth application creation (See Creating a Custom OAuth Application.)
- URL: The base URL of your SuiteCRM system. For example, https://suitecrmhost/.
Password Grant
To connect to SuiteCRM V8 API, set these properties:
- Schema: suitecrmv8.
- AuthScheme: OAuthPassword.
- OAuthClientId: The client key returned during custom OAuth application creation. (See Creating a Custom OAuth Application.)
- OAuthClientSecret: The client secret returned during custom OAuth application creation. (See Creating a Custom OAuth Application.)
- User: The user's username.
- Password: The user's password.
- URL: The base URL of your SuiteCRM system. For example, https://suitecrmhost/.
Installing Dependencies for OAuth Authentication
The OAuth authentication standard requires the authenticating user to interact with SuiteCRM, using a web-browser. If the first OAuth interaction is to be done on the same machine the driver is installed on, for example, a desktop application, the driver needs access to the xdg-open program, which opens the default browser.
To satisfy this dependency, install the corresponding package with your package manager:
Debian/Ubuntu Package | RHEL/Fedora Package | File |
xdg-utils | xdg-utils | xdg-open |
Set the Driver Encoding
The ODBC drivers need to specify which encoding to use with the ODBC Driver Manager. By default, the CData ODBC Drivers for Unix are configured to use UTF-16 which is compatible with unixODBC, but other Driver Managers may require alternative encoding.
Alternatively, if you are using the ODBC driver from an application that uses the ANSI ODBC API it may be necessary to set the ANSI code page. For example, to import Japanese characters in an ANSI application, you can specify the code page in the config file '/opt/cdata/cdata-odbc-driver-for-suitecrm/lib/cdata.odbc.suitecrm.ini':
[Driver]
AnsiCodePage = 932