The unixODBC Project home page:
You need unixODBC with Version at least 2.3.0
Check for existing version
Using RedHat Enterprise Linux, Oracle Linux or SuSE Enterprise Linux, you may have installed unixODBC already.
RedHat RHEL 6, Oracle Linux 6 and SuSE SLES 11 provide outdated packages (Version 2.2).
RedHat RHEL 7, Oracle Linux 7 and SuSE SLES 12 come with Version 2.3.
Check for file odbc.ini and for isql
find /etc/ /usr/local/ -type f -name odbc.ini find /usr/bin /usr/local/bin -type f -name isql
If you find a file /etc/odbc.ini or /etc/unixODBC/odbc.ini, they mostly come from the vendor-supplied rpm package.
If you find a file /usr/local/etc/odbc.ini problably unixODBC was compiled from source.
The file isql will tell you the version. There may be more than one isql on your server. Some other software brings it own isql.
Check Version of unixODBC
/usr/bin/isql --version # Output should be something like unixODBC 2.3.0
Uninstall old version?
If you find an outdated version, i recommend not to uninstall it because mostly some other packages have dependencies.
Install from source
Download latest version from http://www.unixodbc.org/download.html
Prerequistes for Installation
You need the C Compiler cc and make.
In this example the file
unixODBC-2.3.4.tar.gz was copied to the directory /opt
cd /opt # unpack tar xf unixODBC-2.3.4.tar.gz # change to directory cd unixODBC-2.3.4 # configure the package ./configure --silent # compile make # install: in this step the software is copied to /usr/local/... make install
For configuration and compilation you do not need root privileges, only for the last step
make installyou need root privileges.
Testing the Installation
You cannot test very much, because you still dont have a driver to access a database with unixODBC.
/usr/local/bin/isql --version # Output should be unixODBC 2.3.4
To access a database you still need a driver which is specific to the target database.
I will show examples for MS SQL Server, MySQL and Informix.
Access to MS SQL Server Database: FreeTDS Installation
Access to MySQL Database: Connector/ODBC Installation
Access to Informix Database: Informix ODBC Driver Installation