How to install PostgreSQL ODBC in centos 64-bit System

Source: Internet
Author: User

PostgreSQL psqlodbc driver in 64-bit Systems
Http://www.postgresql.org/ftp/odbc/versions/src/
Install the installation package required by psqlodbc in a 2-64-bit system:
UnixODBC-2.3.1.tar.gz
Psqlodbc-09.01.0100.tar.gz
3. Install unixodbc
Tar zxvf unixODBC-2.3.1.tar.gz
CD unixODBC-2.3.1
./Configure -- enable-Gui = No
Make
Make install
4. Install psqlodbc
Unixodbc supports ODBC in Linux, but it is only an ODBC manager. to connect to the actual database, you also need to provide the ODBC driver for this database.
Psqlodbc is a free ODBC driver used to connect to PostgreSQL in Linux.
Note: you must first install unixodbc and then install psqlodbc.
Tar zxvf psqlodbc-09.01.0100.tar.gz
CD psqlodbc-09.01.0100
./Configure -- With-unixodbc -- With-libpq =/usr/local/pgsql
Make
Make install
5. Configure ODBC (one sample is provided below)
VI/etc/odbcinst. ini
[Postgressql]
Description = ODBC for PostgreSQL
Driver =
Driver64 =/usr/local/lib/psqlodbcw. So
Setup =
Setup64 =
Fileusage = 1
Cptimeout =
Cpreuse =
CP/etc/odbcinst. INI/usr/local/etc/odbcinst. ini
VI/etc/ODBC. ini
[Tmau_psv3]
Description = tmau_psv3
Driver = postgressql
Trace = No
Tracefile =
Database = tmau_psv3
Servername = 192.168.51.97
Username = pgadmin
Password = kgpgadmin
Port = 5432
Protocol= 6.4
Readonly = No
Rowversioning = No
Showsystemtables = No
Showoidcolumn = No
Fakeoidindex = No
Connsettings =
CP/etc/ODBC. INI/usr/local/etc/ODBC. ini
6. Use the iSQL tool provided by ODBC to check whether the ODBC driver and DNS are configured successfully.
[Root @ r710-64c6 64bits_install] # iSQL-V tmau_psv3
+ --------------------------------------- +
| Connected! |
|
| SQL-statement |
| Help [tablename] |
| Quit |
|
+ --------------------------------------- +
SQL>
As shown in the preceding figure, psqlodbc is successfully configured.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.