ITPub博客

首页 > Linux操作系统 > Linux操作系统 > redhat linux 安装informix客户端

redhat linux 安装informix客户端

原创 Linux操作系统 作者:lhl1212 时间:2009-05-27 22:36:49 0 删除 编辑
redhat linux 安装informix客户端
1.下载clientsdk.3.50.FC2DE.LINUX.tar(Linux system for x86-64,RedHat),解压tar -xvf clientsdk.3.50.FC2DE.LINUX.tar
2.安装./installclientsdk
3.安装到/opt/IBM/informix目录下
4.转到目录/etc,在文件services中添加informix映射端口,格式为:
(端口名称) 端口及协议) # Informix Server
onbbgxt_port    12008/tcp
5.转到目录/opt/IBM/informix/etc,在文件sqlhosts中添加一个新的数据库连接,格式是:
(名称) (tcp协议) (服务器地址)(端口名称)
onbbgxt         onsoctcp        10.179.80.81     onbbgxt_port
6.转到目录/opt/IBM/informix/etc,修改文件odbc.ini,odbcinst.ini的内容,举例:
#>vi odbc.ini
;---------------------------------------------------------------------------
; IBM INFORMIX ODBC Sample File
;
; File:         odbc.ini
;
;---------------------------------------------------------------------------
[ODBC Data Sources]
dms=IBM INFORMIX ODBC DRIVER
;
; Define ODBC Database Driver's Below - Driver Configuration Section
;
[dms]
Driver=/opt/IBM/informix/lib/cli/iclit09b.so
Description=IBM INFORMIX ODBC DRIVER
Database=dbdms
LogonID=informix
pwd=Passd
Servername=onbbgxt

CursorBehavior=0
CLIENT_LOCALE=zh_CN.GB18030-2000
DB_LOCALE=zh_CN.GB18030-2000
TRANSLATIONDLL=/opt/IBM/informix/lib/esql/igo4a304.so
;
; UNICODE connection Section
;
[ODBC]
;uncomment the below line for UNICODE connection
;UNICODE=UCS-4
;
; Trace file Section
;
Trace=0
TraceFile=/tmp/odbctrace.out
InstallDir=/opt/IBM/informix
TRACEDLL=idmrs09a.so

#>vi odbcinst.ini
---------------------------------------------------------------------------
; IBM INFORMIX ODBC Sample File
;
; File:         odbcinst.ini
;
;---------------------------------------------------------------------------
[ODBC Drivers]
IBM INFORMIX ODBC DRIVER=Installed
[IBM INFORMIX ODBC DRIVER]
Driver=/opt/IBM/informix/lib/cli/iclis09b.so
Setup=/opt/IBM/informix/lib/cli/iclis09b.so

APILevel=1
ConnectFunctions=YYY
DriverODBCVer=03.51
FileUsage=0
SQLLevel=1
将以上两个文件拷贝到/etc目录下
7.给oracle用户添加环境变量
$>vi .bash_profile
export INFORMIXDIR=/opt/IBM/informix
export ODBCINI=/etc/odbc.ini
export ODBCINSTINI=/etc/odbcinst.ini
export PATH=$PATH:/opt/IBM/informix/bin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql
8.安装头文件开发包unixODBC-devel-2.2.11-7.1.x86_64.rpm,使用命令:rpm -iv unixODBC-devel-2.2.11-7.1.x86_64.rpm。已安装了unixODBC可省略此步。
9.测试
$>isq dms -v 回车,出现:
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL>
然后就可以进行操作了
 
具体参见:
How To Setup Generic Connectivity - HSODBC - on Linux
文档 ID:

264567.1

 

Starting with database release 10g Oracle provides generic connectivity for
Linux.

PLEASE PAY ATTENTION: CURRENTLY (UP TO 10gR2) HSODBC IS ONLY PORTED TO
LINUX X86; NOT TO Linux X86-64bit.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/611609/viewspace-604373/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-12-08

  • 博文量
    252
  • 访问量
    490373