zabbix6.0 配置odbc监控oracle过程,报错:
[01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1' : file not found
系统为redhat6.5 参考https://www.modb.pro/db/496093 安装了以下安装包
oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-odbc-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-tools-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
unixODBC-2.2.14-14.el6.x86_64.rpm
unixODBC-devel-2.2.14-14.el6.x86_64.rpm
并配置了环境变量:
export ORACLE_HOME=/usr/lib/oracle/11.2/client64
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib64:/usr/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin
驱动文件 [root@web1]# cat /etc/odbcinst.ini #添加如下内容 [Oracle] Description = Oracle ODBC driver for Oracle 11g Driver= /usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1 数据源文件
[root@web1]# cat /etc/odbc.ini
[Oracle]
Driver = Oracle
ServerName = 192.168.21.1:1521/orcl
UserID = zabbix
Password = zabbix
Port= 1521
isql -v Oracle 测试 报错:
[01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1' : file not found
查看依赖:
[root@web1]# ldd /usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1
linux-vdso.so.1 => (0x00007fff159ff000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f473781e000)
libm.so.6 => /lib64/libm.so.6 (0x00007f4737599000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f473737c000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f4737163000)
libclntsh.so.11.1 => /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1 (0x00007f47347f3000)
libodbcinst.so.1 => not found
libc.so.6 => /lib64/libc.so.6 (0x00007f473424e000)
/lib64/ld-linux-x86-64.so.2 (0x00000030e9400000)
libnnz11.so => /usr/lib/oracle/11.2/client64/lib/libnnz11.so (0x00007f4733e80000)
libaio.so.1 => /lib64/libaio.so.1 (0x00007f4733c7f000)
libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x00007f4733a76000)
查看/usr/lib64/libodbcinst.so.1
不存在,但是有/usr/lib64/libodbcinst.so.2
建立软连接 ln -s /usr/lib64/libodbcinst.so.2 /usr/lib64/libodbcinst.so.1
再次执行isql -v Oracle
[root@web1]# isql -v Oracle
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
评论列表,共 0 条评论
暂无评论