Installing the unixODBC driver manager

The unixODBC driver manager component for Linux® and UNIX platforms are supported.

About this task

The following procedure provides an example of how to install the unixODBC driver manager on a UNIX or Linux system. The steps are based on version 2.2.12, and it is assumed that the name of the downloaded file is unixODBC-2.2.12.tar.gz. The file name might be different if you download a later release. Match the file and directory names in the procedure to the name of the file that you download. To identify the specific steps for your driver, see the README and INSTALL files in the downloaded package.

Procedure

  1. Because the unixODBC installation procedure requires write access to the root of the file system to create installation directories, log in as the superuser so that during the installation process, you can access the system to use the default installation directories.
  2. Download the driver manager file from the unixODBC website (www.unixodbc.org).
  3. Extract the downloaded file by issuing the following command:
    gzip -d unixODBC-2.2.12.tar.gz
  4. Extract the contents of the unixODBC-2.2.12.tar file by issuing the following command:
    tar -xvf unixODBC-2.2.12.tar
  5. Change to the subdirectory that was created when the unixODBC-2.2.12.tar file was extracted by issuing the following command:
    cd undixODBC-2.2.12
  6. Configure the software and set the installation directory to /usr/local/unixODBC in one of the following ways:
    • To configure by using the GUI, issue the following command:
      ./configure --prefix=/usr/local/unixODBC
    • To configure without using the GUI, issue the following command:
      ./configure --prefix=/usr/local/unixODBC --enable-gui=no
  7. Compile the package by issuing the following command:
    make
    This step might take a few minutes to complete.
  8. Install the programs, data files, and documentation by issuing the following command:
    make install

    This step places the bin, etc, lib, and include subdirectories in the /usr/local/unixODBC directory. These subdirectories contain the programs, data files, and documentation for the unixODBC driver manager package.

  9. Add the bin and lib subdirectories to the environment by issuing the appropriate commands:
    • For AIX® operating systems:
         export PATH=$PATH:/usr/local/unixODBC/bin
         export LIBPATH=$LIBPATH:/usr/local/unixODBC/lib
    • For HP-UX operating systems:
         export PATH=$PATH:/usr/local/unixODBC/bin
         export SHLIB_PATH=$SHLIB_PATH:/usr/local/unixODBC/lib
    • For Linux and Solaris operating systems:
         export PATH=$PATH:/usr/local/unixODBC/bin
         export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/unixODBC/lib

    The previous commands change the environment for the current session only. After you verify that your environment modifications work correctly, edit your login script to set the environment variables when users log in.

  10. Optional: To free disk space, delete the installation .tar file from the file system by issuing the following command:
    rm unixODBC-2.2.12.tar

    If you prefer, you can move the installation .tar file to somewhere else in the file system for safekeeping.