This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Installing the client drivers on Linux and UNIX-Like platforms

This topic explains how to install the client drivers on Linux and UNIX-like platforms.

This topic explains how to install the client drivers on Linux and UNIX-like platforms.

1 - Installing driver managers on Linux and other UNIX-like platforms

If your client platform does not already have an ODBC driver manager, you need to install one before you can use the Vertica ODBC client driver.

If your client platform does not already have an ODBC driver manager, you need to install one before you can use the Vertica ODBC client driver. The driver manager provides an interface between your client operating system and the ODBC drivers. See Client drivers support for a list of driver managers that are supported on each of the client platforms.

Driver managers can be downloaded from your operating system specific repository and from the links below.

Vertica does not provide instructions for installing and configuring these third-party binaries. For download and configuration information, see the respective driver manager websites for installation and configuration information:

2 - Installing the client RPM on red hat and SUSE

For Red Hat Enterprise Linux and SUSE Linux Enterprise Server, you can download and install a client driver RPM that installs both the ODBC and JDBC driver libraries and the client.

For Red Hat Enterprise Linux and SUSE Linux Enterprise Server, you can download and install a client driver RPM that installs both the ODBC and JDBC driver libraries and the vsql client.

To install the client driver RPM package:

  1. Open a Web browser and go to Vertica driver downloads page.

  2. Find the drivers for your version of Vertica.

  3. Download the client package file that matches your client platform's architecture.

  4. If you did not directly download the driver package on the client system, transfer the file to the client.

  5. Install the driver package you downloaded. On Windows and Mac, double-click the package file to start the install process. On Linux, if your distribution uses RPm package, install the RPM with the command:

    # rpm -Uvh package_name.rpm
    

    If your Linux distribution does not use RPM packages, expand the .tar.gz file in a convenient location on your system.

Once you have installed the client package, you need to create a DSN (see Creating an ODBC DSN for Linux) and set some additional configuration parameters (see Required ODBC driver configuration settings for Linux and UNIX) to use ODBC. To use JDBC, you need to modify your class path (see Modifying the Java CLASSPATH) before you can use JDBC.

You may also want to add the vsql client to your PATH environment variable so that you do not need to enter its full path to run it. You add it to your path by adding the following to the .profile file in your home directory or the global /etc/profile file:

export PATH=$PATH:/opt/vertica/bin

3 - Installing JDBC driver on Linux

The JDBC driver is available for download from the.

The JDBC driver is available for download from the Vertica driver downloads page. There is a single .jar file that works on all platforms and architectures. To download and install the file:

  1. Open a Web browser and go to the Vertica driver downloads page.

  2. In section that corresponds to your version of Vertica, click the link for the JDBC driver.

  3. You need to copy the .jar file you downloaded to a directory in your Java CLASSPATH on every client system with which you want to access Vertica. You can either:

    • Copy the .jar file to its own directory (such as /opt/vertica/java/lib) and then add that directory to your CLASSPATH (recommended). See Modifying the Java CLASSPATH for details.

    • Copy the .jar file to directory that is already in your CLASSPATH (for example, a directory where you have placed other .jar files on which your application depends).

4 - Installing ODBC drivers on Linux

Read Driver Prerequisites before you proceed.

Read Driver prerequisites before you proceed.

For Red Hat Enterprise Linux and SUSE Linux Enterprise Server, you can download and install a client RPM that installs both the ODBC and JDBC driver and the vsql client. See Installing the client RPM on red hat and SUSE.

The ODBC driver installation packages are broken down by client platform on the Vertica driver downloads page. The package's filename is named based on its operating system and architecture (for example, vertica_ 11.1.x.xx_odbc_x86_64_linux.tar.gz)

Installation procedure

  1. Open a web browser and browse to the Vertica driver downloads page.

  2. Locate and download the driver package that matches your Vertica version and platform.

  3. If you did not directly download to the client system, transfer the downloaded file to it.

  4. Log in to the client system as root.

  5. If the directory /opt/vertica/ does not exist, create it:

    # mkdir -p /opt/vertica/
    
  6. Copy the downloaded file to the /opt/vertica/ directory. For example:

    # cp vertica_11.1.x.xx_odbc_x86_64_linux.tar.gz /opt/vertica/
    
  7. Change to the /opt/vertica/ directory:

    # cd /opt/vertica/
    
  8. Uncompress the file you downloaded. For example:

    $ tar vzxf vertica_ 11.1.x.xx_odbc_x86_64_linux.tar.gz

    Two folders are created: one for the include file, and one for the library files. The path of the library file depends on the processor architecture: lib for 32-bit libraries, and lib64 for 64-bit libraries. So, a 64-bit driver client download creates the directories:

    • /opt/vertica/include, which contains the header file

    • /opt/vertica/lib64, which contains the library file

Post driver installation configuration

You must configure the ODBC driver before you can use it. There are two required configuration files:

4.1 - Required ODBC driver configuration settings for Linux and UNIX

In addition to DSN settings, Vertica provides additional ODBC client driver configuration parameters.

In addition to DSN settings, Vertica provides additional ODBC client driver configuration parameters. These settings control the following:

  • The text encoding used by the driver manager (for example, UTF-8 or UTF-16).

  • The location of the directory containing the Vertica ODBC driver's error message files.

  • Whether and how the ODBC driver logs messages.

On Linux and UNIX platforms, you must provide these additional settings manually so that the ODBC driver can function properly. To do so, edit the vertica.ini file to supply the necessary additional configuration settings. You specify where the ODBC driver can find the vertica.ini file using an environment variable named VERTICAINI. See Setting ODBC driver settings on Linux and UNIX-Like platforms.

4.2 - Setting ODBC driver settings on Linux and UNIX-Like platforms

Driver settings specific to Vertica are stored in a text file named vertica.ini (although you may choose a different file name).

Driver settings specific to Vertica are stored in a text file named vertica.ini (although you may choose a different file name). On Linux and UNIX platforms, you must edit the vertica.ini file to supply additional configuration settings before the ODBC driver can function properly. You tell the Vertica ODBC driver where to find the vertica.ini file using an environment variable named VERTICAINI.

Required settings

On Linux and UNIX platforms, you must configure two settings in order for the ODBC driver to work correctly:

  • ErrorMessagesPath

  • ODBCInstLib (unless the driver manager's installation library is in a directory listed in the LD_LIBRARY_PATH or LIB_PATH environment variables).

If your driver manager does not use UTF-8 encoding, you need to set DriverManagerEncoding to the proper encoding.

Create a vertica.ini file

There is no standard location for the vertica.ini file—you can store the file anywhere that it is convenient for you on your client system. One possible location is in the /etc directory if you have multiple users on your client system that need to access it. You can also have a vertica.ini file in each user's home directory so users can alter their own settings. Wherever you store it, be sure users have read access to the file.

The format of the vertica.ini file is similar to the odbc.ini file, with a section followed by parameter definitions. Unlike the odbc.ini file, vertica.ini contains a single section named Driver:

[Driver]

Following the section definition, you add setting definitions, one per line. A setting definition consists of the setting name, followed by an equal sign (=), followed by the value. The value does not need quotes. For example, to set the ODBCInstLib setting, you add a line like this:

ODBCInstLib=/usr/lib64/libodbcinst.so

See Additional parameter settings for a list of the additional settings.

Set the VERTICAINI environment variable

You must set an environment variable named VERTICAINI to the absolute path of the vertica.ini file. The Vertica ODBC driver uses this variable to find the settings.

Where you set this variable depends on whether users on your client system need to have separate vertica.ini files. If you want to have a single, system-wide vertica.ini file, you can add a command to set VERTICAINI in /etc/profile or some other system-wide environment file. For example:

export VERTICAINI=/etc/vertica.ini

If users need individual vertica.ini files, set VERTICAINI in their ~/.profile or similar configuration file. For example:

export VERTICAINI=~/.vertica.ini

Example vertica.ini file

The following example vertica.ini file configures the ODBC driver to:

  • use the 64-bit UNIXODBC driver manager.

  • get its error messages from the standard Vertica 64-bit ODBC driver installation directory.

  • log all warnings and more severe messages to log files stored in the temporary directory.

[Driver]
DriverManagerEncoding=UTF-16
ODBCInstLib=/usr/lib64/libodbcinst.so
ErrorMessagesPath=/opt/vertica
LogLevel=4
LogPath=/tmp