This topic explains how to install the client drivers on Linux and UNIX-like platforms.
This is the multi-page printable view of this section. Click here to print.
Installing the client drivers on Linux and UNIX-Like platforms
- 1: Installing driver managers on Linux and other UNIX-like platforms
- 2: Installing the client RPM on red hat and SUSE
- 3: Installing JDBC driver on Linux
- 4: Installing ODBC drivers on Linux
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. 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:
-
UnixODBC: http://www.unixodbc.org/
-
iODBC: http://www.iodbc.org
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 vsql client.
Important
Vertica provides the FIPS-compliant client driver only as an rpm for 64-bit clients. You can install this rpm only on FIPS-enabled machines. The FIPS client includes vsql and ODBC drivers. If you are installing the FIPS-specific client, refer to the section, Installing the FIPS client driver for ODBC and vsql.To install the client driver RPM package:
-
Open a Web browser and go to Vertica driver downloads page.
-
Find the drivers for your version of Vertica.
-
Download the client package file that matches your client platform's architecture.
Note
The 64-bit client driver RPM installs both the 64-bit and 32-bit ODBC driver libraries on non-FIPS compliant systems. -
If you did not directly download the driver package on the client system, transfer the file to the client.
-
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.
Note
You receive one or more conflict error messages if there are existing Vertica client driver files on your system. This can happen if you are trying to install the client driver package on a system that has the server package installed, since the server package also includes the client drivers. In this case, you don't need to install the client drivers, and can instead use the drivers installed by the server package. If the conflict arises from an old driver installation or from a server installation for an older version, you can use the rpm command's--force
switch to force it to overwrite the existing files with the files in the client driver package.
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
Note
The ODBC and JDBC client drivers are installed by the server .rpm
files. If you have installed Vertica on your Linux system for development or testing purposes, you do not need to download and install the client drivers on it—you just need to configure the drivers. To use ODBC, you need to create a DSN (see Creating an ODBC DSN for Linux). To use JDBC, you need to add the JDBC client driver to the Java CLASSPATH (see Modifying the Java CLASSPATH). (The JDBC client driver is not available on FIPS-compliant systems.)
For details, see Supported platforms.
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:
-
Open a Web browser and go to the Vertica driver downloads page.
-
In section that corresponds to your version of Vertica, click the link for the JDBC driver.
-
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).
-
Note
In the directory where you copied the.jar
file, you should create a symbolic link named vertica_jdbc.jar
to the .jar
file. You can reference this symbolic link anywhere you need to use the name of the JDBC library without having to worry any future upgrade invalidating the file name. This symbolic link is automatically created on server installs. On clients, you need to create and manually maintain this symbolic link yourself if you installed the driver manually. The Installing the client RPM on red hat and SUSE create this link when they install the JDBC library.
4 - Installing ODBC drivers on Linux
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.
Note
The ODBC and JDBC client drivers are installed by the server .rpm
files. If you have installed Vertica on your Linux system for development or testing purposes, you do not need to download and install the client drivers on it—you just need to configure the drivers. To use ODBC, you need to create a DSN (see Creating an ODBC DSN for Linux). To use JDBC, you need to add the JDBC client driver to the Java CLASSPATH (see Modifying the Java CLASSPATH). (The JDBC client driver is not available on FIPS-compliant systems.)
For details, see Supported platforms.
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
)
Important
Vertica provides the FIPS-compliant client driver only as an rpm for 64-bit clients. You can install this rpm only on FIPS-enabled machines. The FIPS client includes vsql and ODBC drivers. If you are installing the FIPS-specific client, refer to the section, Installing the FIPS client driver for ODBC and vsql.Installation procedure
-
Open a web browser and browse to the Vertica driver downloads page.
-
Locate and download the driver package that matches your Vertica version and platform.
-
If you did not directly download to the client system, transfer the downloaded file to it.
-
Log in to the client system as root.
-
If the directory
/opt/vertica/
does not exist, create it:# mkdir -p /opt/vertica/
-
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/
-
Change to the /opt/vertica/ directory:
# cd /opt/vertica/
-
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, andlib64
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:
-
The
odbc.ini
configuration file defines the Data Source Names (DSNs) that tell the ODBC how to access your Vertica databases. See Creating an ODBC Data Source Name for instructions to create this file. -
The
vertica.ini
configuration file defines some Vertica-specific settings required by the drivers. See Required ODBC driver configuration settings for Linux and UNIX for instructions to create this file.
Note
If you are upgrading your ODBC driver, you must either update your DSNs to point to the newly-installed driver or create new DSNs. If yourodbc.ini
file references drivers defined in an odbcinst.ini
file, you just need to update the odbcinst.ini
file. See Creating an ODBC data source name (DSN) for details.
4.1 - Required ODBC driver configuration settings for Linux and UNIX
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). 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