LINUX-安装odbc

centos 7 安装unixodbc

官网https://pkgs.org/download/libltdl.so.7()(64bit)

# 安装libtool
yum install libtool-ltdl -y
# 上传odbc包至服务器
资源链接 https://download.csdn.net/download/xiaoxiaochunmei/86246535
# 安装rpm包
rpm -ivh unixODBC-2.3.1-14.el7.x86_64.rpm

配置ODBC

# 修改配置文件 /etc/odbcinst.ini,添加lib库信息
[UXDB]
Description = ODBC for UXDB
Driver = /home/uxdb/uxdbinstall/dbsql/interface/odbc/lib/psqlodbcw.so
Setup = /usr/lib/libodbcpsqlS.so
Driver64 = /home/uxdb/uxdbinstall/dbsql/interface/odbc/lib/psqlodbcw.so
Setup64 = /usr/lib64/libodbcpsqlS.so
FileUsage = 1

LINUX-安装odbc_第1张图片

# 修改配置文件/etc/odbc.ini,添加连接信息
[uxdb]
Description = UXDBODBC
Driver = UXDB
Database = UXDB
Servername = xx.xx.xx.xx
UserName = uxdb
Password = ********
Port = 5432
ReadOnly = 0
ConnSettings = set client_encoding to UTF8

使用ODBC

isql uxdb

你可能感兴趣的:(linux,bash,运维)