odbc.ini 파일에서 암호는 변경하자.



- Check my system

uname -a;

Linux localhost 4.9.6-gentoo-r1 #1 SMP Mon Mar 6 00:55:03 KST 2017 x86_64 Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz GenuineIntel GNU/Linux


date;

Sun Mar 26 06:04:24 KST 2017



- Install unixODBC

emerge unixODBC;

(dev-db/unixODBC-2.3.2-r1::gentoo)



- Check default of unixODBC

odbcinst -j;

unixODBC 2.3.2

DRIVERS............: /etc/unixODBC/odbcinst.ini

SYSTEM DATA SOURCES: /etc/unixODBC/odbc.ini

FILE DATA SOURCES..: /etc/unixODBC/ODBCDataSources

USER DATA SOURCES..: /root/.odbc.ini

SQLULEN Size.......: 8

SQLLEN Size........: 8

SQLSETPOSIROW Size.: 8



- Configure postgresql odbc driver

vim /etc/unixODBC/odbcinst.ini;

[psqlodbc-9.5]

Description = PostgreSQL ODBC psqlodbc-09.05.0400 Driver

Driver = /usr/lib/psqlodbcw.so

UsageCount = 2



- Configure postgresql odbc data sources

vim /etc/unixODBC/odbc.ini;

[ODBC Data Sources]

psqlodbc-9.5-openldap = PostgreSQL ODBC psqlodbc-09.05.0400 Data Source


[psqlodbc-9.5-openldap]

Description = PostgreSQL ODBC psqlodbc-09.05.0400 Data Source

Driver = psqlodbc-9.5

Servername = localhost

Port = 5432

Database = openldap

Username = openldap

Password = PASSWORD

ReadOnly = no

ShowSystemTables = no



- Install postgresql odbc driver

odbcinst -i -d -f /etc/unixODBC/odbcinst.ini;



- install postgresql odbc data source

odbcinst -i -s -f /etc/unixODBC/odbc.ini;

Posted by nol2ter

태그목록