达梦数据库ODBC编译安装

达梦数据库ODBC编译安装

一、虚拟机环境:vmware workstation 14

二、操作系统环境:kylin 社区版

Kylin-4.0.2-server-sp1-Community-20170412-x86_64.iso

三、glibc、gcc版本

root@kylin4:/opt# getconf GNU_LIBC_VERSION
glibc 2.23

root@kylin4:/opt# gcc --version
gcc (Ubuntu 5.3.1-14kord4) 5.3.1 20160413
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 

四、达梦数据库版本v8

dm8_20210818_x86_rh6_64_ent_8.4.2.18_pack14.iso

root@kylin4:~# su - dmdba

dmdba@kylin4:~$ id
uid=1001(dmdba) gid=1001(dinstall) 组=1001(dinstall)
dmdba@kylin4:~$

dmdba@kylin4:/dm8/bin$ ps -ef|grep dmdba
dmdba      1317      1  0 16:08 ?        00:00:00 /dm8/bin/dmap
dmdba      1339      1  0 16:08 ?        00:00:04 /dm8/bin/dmserver /dm8/data/DAMENG/dm.ini -noconsole
root       8904   1750  0 16:22 pts/0    00:00:00 su - dmdba
dmdba      8905   8904  0 16:22 pts/0    00:00:00 -su
dmdba      8913   8905  0 16:22 pts/0    00:00:00 ps -ef
dmdba      8914   8905  0 16:22 pts/0    00:00:00 grep dmdba
dmdba@kylin4:/dm8/bin$ ./disql
disql       disql_conf/
dmdba@kylin4:/dm8/bin$ ./disql
disql V8
用户名:

五、安装

5.1odbc安装介质

root@kylin4:~# cd /opt
root@kylin4:/opt# ls -l unixODBC-2.3.0.tar.gz
-rw-r--r-- 1 root root 1804749 5月  11 22:15 unixODBC-2.3.0.tar.gz
root@kylin4:/opt#

root@kylin4:~#
root@kylin4:~# cd /opt/
root@kylin4:/opt# tar -zxf unixODBC-2.3.0.tar.gz
root@kylin4:/opt# ll
总用量 1780
drwxr-xr-x  4 root root    4096 5月  11 22:15 ./
drwxr-xr-x 24 root root    4096 5月  11 17:50 ../
drwxr-xr-x  2 root root    4096 4月  12  2017 firefox/
drwxr-xr-x 19 andy andy    4096 5月  11 22:16 unixODBC-2.3.0/
-rw-r--r--  1 root root 1804749 5月  11 22:15 unixODBC-2.3.0.tar.gz

5.2 configure


root@kylin4:/opt# cd unixODBC-2.3.0/

root@kylin4:/opt/unixODBC-2.3.0# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gawk... (cached) mawk
checking for bison... no
checking for byacc... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for flex... no
checking for lex... no
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/sem.h usability... yes
checking sys/sem.h presence... yes
checking for sys/sem.h... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking which extension is used for runtime loadable modules... .so
checking which variable specifies run-time module search path... LD_LIBRARY_PATH
checking for the default library search path... /lib /usr/lib /usr/local/lib /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/mesa-egl /usr/lib/x86_64-linux-gnu/mesa
checking for library containing dlopen... -ldl
checking for dlerror... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dld_link in -ldld... no
checking for _ prefix in compiled symbols... no
checking whether deplibs are loaded by dlopen... yes
checking for argz.h... yes
checking for error_t... yes
checking for argz_add... yes
checking for argz_append... yes
checking for argz_count... yes
checking for argz_create_sep... yes
checking for argz_insert... yes
checking for argz_next... yes
checking for argz_stringify... yes
checking if argz actually works... yes
checking whether libtool supports -dlopen/-dlpreopen... yes
checking for ltdl.h... no
checking where to find libltdl headers... -I${top_srcdir}/libltdl
checking where to find libltdl library... ${top_build_prefix}libltdl/libltdlc.la
checking for unistd.h... (cached) yes
checking for dl.h... no
checking for sys/dl.h... no
checking for dld.h... no
checking for mach-o/dyld.h... no
checking for dirent.h... yes
checking for closedir... yes
checking for opendir... yes
checking for readdir... yes
checking for strlcat... no
checking for strlcpy... no
checking for shared lib extension... .so
checking for iconv... yes
checking for iconv declaration... install-shextern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for encoding to use for CHAR representations ... auto-search
checking for encoding to use for UNICODE representations ... auto-search
checking for crypt in -lcrypt... yes
checking for pow in -lm... yes
checking for readline in -lreadline ... no
checking for readline in -lreadline -lcurses ... no
checking Are we using ini caching ... yes
checking whether time.h and sys/time.h may both be included... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking size of long... 8
checking if platform is 64 bit... Yes
checking for long long... yes
checking size of long int... 8
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for vsnprintf... yes
checking for strtol... yes
checking for atoll... yes
checking for strtoll... yes
checking for endpwent... yes
checking for gettimeofday... yes
checking for ftime... yes
checking for time... yes
checking for stricmp... no
checking for strnicmp... no
checking if os is AIX ... no - enable check for libthread
checking for mutex_lock in -lthread ... no
checking for pthread_mutex_lock in -lpthread... yes
checking if compiler accepts -pthread... yes
checking for localtime_r in -lc... yes
checking for ftok... yes
checking for semget... yes
checking for shmget... yes
checking for semop... yes
checking for snprintf... yes
checking for semundo union... yes
checking for ANSI C header files... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for unistd.h... (cached) yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking crypt.h usability... yes
checking crypt.h presence... yes
checking for crypt.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking synch.h usability... no
checking synch.h presence... no
checking for synch.h... no
checking for strings.h... (cached) yes
checking for string.h... (cached) yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking sys/malloc.h usability... no
checking sys/malloc.h presence... no
checking for sys/malloc.h... no
checking for sys/types.h... (cached) yes
checking for sys/sem.h... (cached) yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking varargs.h usability... no
checking varargs.h presence... no
checking for varargs.h... no
checking for sys/time.h... (cached) yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking msql.h usability... no
checking msql.h presence... no
checking for msql.h... no
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for uid_t in sys/types.h... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for working alloca.h... yes
checking for alloca... yes
checking for vprintf... yes
checking for _doprnt... no
checking for putenv... yes
checking for socket... yes
checking for strdup... yes
checking for strstr... yes
checking for setenv... yes
checking for setlocale... yes
checking for strchr... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating extras/Makefile
config.status: creating log/Makefile
config.status: creating lst/Makefile
config.status: creating ini/Makefile
config.status: creating odbcinst/Makefile
config.status: creating cur/Makefile
config.status: creating DriverManager/Makefile
config.status: creating exe/Makefile
config.status: creating DRVConfig/Makefile
config.status: creating DRVConfig/drvcfg1/Makefile
config.status: creating DRVConfig/drvcfg2/Makefile
config.status: creating DRVConfig/PostgreSQL/Makefile
config.status: creating DRVConfig/MiniSQL/Makefile
config.status: creating DRVConfig/MySQL/Makefile
config.status: creating DRVConfig/nn/Makefile
config.status: creating DRVConfig/esoob/Makefile
config.status: creating DRVConfig/oplodbc/Makefile
config.status: creating DRVConfig/template/Makefile
config.status: creating DRVConfig/tds/Makefile
config.status: creating DRVConfig/txt/Makefile
config.status: creating DRVConfig/Oracle/Makefile
config.status: creating DRVConfig/sapdb/Makefile
config.status: creating DRVConfig/Mimer/Makefile
config.status: creating Drivers/Makefile
config.status: creating Drivers/Postgre7.1/Makefile
config.status: creating Drivers/nn/Makefile
config.status: creating Drivers/template/Makefile
config.status: creating Drivers/MiniSQL/Makefile
config.status: creating include/Makefile
config.status: creating doc/Makefile
config.status: creating doc/AdministratorManual/Makefile
config.status: creating doc/ProgrammerManual/Makefile
config.status: creating doc/ProgrammerManual/Tutorial/Makefile
config.status: creating doc/UserManual/Makefile
config.status: creating doc/lst/Makefile
config.status: creating samples/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
=== configuring in libltdl (/opt/unixODBC-2.3.0/libltdl)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local'  '--enable-ltdl-convenience' --cache-file=/dev/null --srcdir=.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking which extension is used for runtime loadable modules... .so
checking which variable specifies run-time module search path... LD_LIBRARY_PATH
checking for the default library search path... /lib /usr/lib /usr/local/lib /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/mesa-egl /usr/lib/x86_64-linux-gnu/mesa
checking for library containing dlopen... -ldl
checking for dlerror... yes
checking for shl_load... (cached) no
checking for shl_load in -ldld... (cached) no
checking for dld_link in -ldld... no
checking for _ prefix in compiled symbols... no
checking whether deplibs are loaded by dlopen... yes
checking for argz.h... yes
checking for error_t... yes
checking for argz_add... yes
checking for argz_append... yes
checking for argz_count... yes
checking for argz_create_sep... yes
checking for argz_insert... yes
checking for argz_next... yes
checking for argz_stringify... yes
checking if argz actually works... yes
checking whether libtool supports -dlopen/-dlpreopen... yes
checking for unistd.h... (cached) yes
checking for dl.h... no
checking for sys/dl.h... no
checking for dld.h... no
checking for mach-o/dyld.h... no
checking for dirent.h... yes
checking for closedir... yes
checking for opendir... yes
checking for readdir... yes
checking for strlcat... no
checking for strlcpy... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
root@kylin4:/opt/unixODBC-2.3.0#
 

5.2 make


root@kylin4:/opt/unixODBC-2.3.0# make -j2

root@kylin4:/opt/unixODBC-2.3.0# make -j2
make  all-recursive
make[1]: Entering directory '/opt/unixODBC-2.3.0'
Making all in extras
make[2]: Entering directory '/opt/unixODBC-2.3.0/extras'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/extras'
Making all in log
make[2]: Entering directory '/opt/unixODBC-2.3.0/log'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/log'
Making all in lst
make[2]: Entering directory '/opt/unixODBC-2.3.0/lst'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/lst'
Making all in ini
make[2]: Entering directory '/opt/unixODBC-2.3.0/ini'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/ini'
Making all in libltdl
make[2]: Entering directory '/opt/unixODBC-2.3.0/libltdl'
make  all-am
make[3]: Entering directory '/opt/unixODBC-2.3.0/libltdl'
make[3]: Leaving directory '/opt/unixODBC-2.3.0/libltdl'
make[2]: Leaving directory '/opt/unixODBC-2.3.0/libltdl'
Making all in odbcinst
make[2]: Entering directory '/opt/unixODBC-2.3.0/odbcinst'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/odbcinst'
Making all in DriverManager
make[2]: Entering directory '/opt/unixODBC-2.3.0/DriverManager'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/DriverManager'
Making all in exe
make[2]: Entering directory '/opt/unixODBC-2.3.0/exe'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/exe'
Making all in cur
make[2]: Entering directory '/opt/unixODBC-2.3.0/cur'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/cur'
Making all in DRVConfig
make[2]: Entering directory '/opt/unixODBC-2.3.0/DRVConfig'
make[3]: Entering directory '/opt/unixODBC-2.3.0/DRVConfig'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/opt/unixODBC-2.3.0/DRVConfig'
make[2]: Leaving directory '/opt/unixODBC-2.3.0/DRVConfig'
Making all in Drivers
make[2]: Entering directory '/opt/unixODBC-2.3.0/Drivers'
make[3]: Entering directory '/opt/unixODBC-2.3.0/Drivers'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/opt/unixODBC-2.3.0/Drivers'
make[2]: Leaving directory '/opt/unixODBC-2.3.0/Drivers'
Making all in include
make[2]: Entering directory '/opt/unixODBC-2.3.0/include'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/include'
Making all in doc
make[2]: Entering directory '/opt/unixODBC-2.3.0/doc'
Making all in AdministratorManual
make[3]: Entering directory '/opt/unixODBC-2.3.0/doc/AdministratorManual'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/opt/unixODBC-2.3.0/doc/AdministratorManual'
Making all in ProgrammerManual
make[3]: Entering directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual'
Making all in Tutorial
make[4]: Entering directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual/Tutorial'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual/Tutorial'
make[4]: Entering directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual'
make[3]: Leaving directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual'
Making all in UserManual
make[3]: Entering directory '/opt/unixODBC-2.3.0/doc/UserManual'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/opt/unixODBC-2.3.0/doc/UserManual'
Making all in lst
make[3]: Entering directory '/opt/unixODBC-2.3.0/doc/lst'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/opt/unixODBC-2.3.0/doc/lst'
make[3]: Entering directory '/opt/unixODBC-2.3.0/doc'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/opt/unixODBC-2.3.0/doc'
make[2]: Leaving directory '/opt/unixODBC-2.3.0/doc'
Making all in samples
make[2]: Entering directory '/opt/unixODBC-2.3.0/samples'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/samples'
make[2]: Entering directory '/opt/unixODBC-2.3.0'
make[2]: Leaving directory '/opt/unixODBC-2.3.0'
make[1]: Leaving directory '/opt/unixODBC-2.3.0'
root@kylin4:/opt/unixODBC-2.3.0#
 

5.3 make install


root@kylin4:/opt/unixODBC-2.3.0# make install
Making install in extras
make[1]: Entering directory '/opt/unixODBC-2.3.0/extras'
make[2]: Entering directory '/opt/unixODBC-2.3.0/extras'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/extras'
make[1]: Leaving directory '/opt/unixODBC-2.3.0/extras'
Making install in log
make[1]: Entering directory '/opt/unixODBC-2.3.0/log'
make[2]: Entering directory '/opt/unixODBC-2.3.0/log'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/log'
make[1]: Leaving directory '/opt/unixODBC-2.3.0/log'
Making install in lst
make[1]: Entering directory '/opt/unixODBC-2.3.0/lst'
make[2]: Entering directory '/opt/unixODBC-2.3.0/lst'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/lst'
make[1]: Leaving directory '/opt/unixODBC-2.3.0/lst'
Making install in ini
make[1]: Entering directory '/opt/unixODBC-2.3.0/ini'
make[2]: Entering directory '/opt/unixODBC-2.3.0/ini'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/ini'
make[1]: Leaving directory '/opt/unixODBC-2.3.0/ini'
Making install in libltdl
make[1]: Entering directory '/opt/unixODBC-2.3.0/libltdl'
make  install-am
make[2]: Entering directory '/opt/unixODBC-2.3.0/libltdl'
make[3]: Entering directory '/opt/unixODBC-2.3.0/libltdl'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include"
test -z "" || /bin/mkdir -p ""
make[3]: Leaving directory '/opt/unixODBC-2.3.0/libltdl'
make[2]: Leaving directory '/opt/unixODBC-2.3.0/libltdl'
make[1]: Leaving directory '/opt/unixODBC-2.3.0/libltdl'
Making install in odbcinst
make[1]: Entering directory '/opt/unixODBC-2.3.0/odbcinst'
make[2]: Entering directory '/opt/unixODBC-2.3.0/odbcinst'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libodbcinst.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libodbcinst.so.1.0.0 /usr/local/lib/libodbcinst.so.1.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libodbcinst.so.1.0.0 libodbcinst.so.1 || { rm -f libodbcinst.so.1 && ln -s libodbcinst.so.1.0.0 libodbcinst.so.1; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libodbcinst.so.1.0.0 libodbcinst.so || { rm -f libodbcinst.so && ln -s libodbcinst.so.1.0.0 libodbcinst.so; }; })
libtool: install: /usr/bin/install -c .libs/libodbcinst.lai /usr/local/lib/libodbcinst.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/usr/local/etc" || /bin/mkdir -p "/usr/local/etc"
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/odbcinst'
make[1]: Leaving directory '/opt/unixODBC-2.3.0/odbcinst'
Making install in DriverManager
make[1]: Entering directory '/opt/unixODBC-2.3.0/DriverManager'
make[2]: Entering directory '/opt/unixODBC-2.3.0/DriverManager'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libodbc.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libodbc.so.1.0.0 /usr/local/lib/libodbc.so.1.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libodbc.so.1.0.0 libodbc.so.1 || { rm -f libodbc.so.1 && ln -s libodbc.so.1.0.0 libodbc.so.1; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libodbc.so.1.0.0 libodbc.so || { rm -f libodbc.so && ln -s libodbc.so.1.0.0 libodbc.so; }; })
libtool: install: /usr/bin/install -c .libs/libodbc.lai /usr/local/lib/libodbc.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/DriverManager'
make[1]: Leaving directory '/opt/unixODBC-2.3.0/DriverManager'
Making install in exe
make[1]: Entering directory '/opt/unixODBC-2.3.0/exe'
make[2]: Entering directory '/opt/unixODBC-2.3.0/exe'
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
  /bin/bash ../libtool   --mode=install /usr/bin/install -c isql dltest odbcinst iusql odbc_config '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/isql /usr/local/bin/isql
libtool: install: /usr/bin/install -c dltest /usr/local/bin/dltest
libtool: install: /usr/bin/install -c .libs/odbcinst /usr/local/bin/odbcinst
libtool: install: /usr/bin/install -c .libs/iusql /usr/local/bin/iusql
libtool: install: /usr/bin/install -c odbc_config /usr/local/bin/odbc_config
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/exe'
make[1]: Leaving directory '/opt/unixODBC-2.3.0/exe'
Making install in cur
make[1]: Entering directory '/opt/unixODBC-2.3.0/cur'
make[2]: Entering directory '/opt/unixODBC-2.3.0/cur'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libodbccr.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libodbccr.so.1.0.0 /usr/local/lib/libodbccr.so.1.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libodbccr.so.1.0.0 libodbccr.so.1 || { rm -f libodbccr.so.1 && ln -s libodbccr.so.1.0.0 libodbccr.so.1; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libodbccr.so.1.0.0 libodbccr.so || { rm -f libodbccr.so && ln -s libodbccr.so.1.0.0 libodbccr.so; }; })
libtool: install: /usr/bin/install -c .libs/libodbccr.lai /usr/local/lib/libodbccr.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/cur'
make[1]: Leaving directory '/opt/unixODBC-2.3.0/cur'
Making install in DRVConfig
make[1]: Entering directory '/opt/unixODBC-2.3.0/DRVConfig'
make[2]: Entering directory '/opt/unixODBC-2.3.0/DRVConfig'
make[3]: Entering directory '/opt/unixODBC-2.3.0/DRVConfig'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/opt/unixODBC-2.3.0/DRVConfig'
make[2]: Leaving directory '/opt/unixODBC-2.3.0/DRVConfig'
make[1]: Leaving directory '/opt/unixODBC-2.3.0/DRVConfig'
Making install in Drivers
make[1]: Entering directory '/opt/unixODBC-2.3.0/Drivers'
make[2]: Entering directory '/opt/unixODBC-2.3.0/Drivers'
make[3]: Entering directory '/opt/unixODBC-2.3.0/Drivers'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/opt/unixODBC-2.3.0/Drivers'
make[2]: Leaving directory '/opt/unixODBC-2.3.0/Drivers'
make[1]: Leaving directory '/opt/unixODBC-2.3.0/Drivers'
Making install in include
make[1]: Entering directory '/opt/unixODBC-2.3.0/include'
make[2]: Entering directory '/opt/unixODBC-2.3.0/include'
make[2]: Nothing to be done for 'install-exec-am'.
test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include"
 /usr/bin/install -c -m 644 odbcinst.h odbcinstext.h sql.h sqlext.h sqltypes.h sqlucode.h uodbc_stats.h uodbc_extras.h '/usr/local/include'
make[2]: Leaving directory '/opt/unixODBC-2.3.0/include'
make[1]: Leaving directory '/opt/unixODBC-2.3.0/include'
Making install in doc
make[1]: Entering directory '/opt/unixODBC-2.3.0/doc'
Making install in AdministratorManual
make[2]: Entering directory '/opt/unixODBC-2.3.0/doc/AdministratorManual'
make[3]: Entering directory '/opt/unixODBC-2.3.0/doc/AdministratorManual'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/opt/unixODBC-2.3.0/doc/AdministratorManual'
make[2]: Leaving directory '/opt/unixODBC-2.3.0/doc/AdministratorManual'
Making install in ProgrammerManual
make[2]: Entering directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual'
Making install in Tutorial
make[3]: Entering directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual/Tutorial'
make[4]: Entering directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual/Tutorial'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual/Tutorial'
make[3]: Leaving directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual/Tutorial'
make[3]: Entering directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual'
make[4]: Entering directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual'
make[3]: Leaving directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual'
make[2]: Leaving directory '/opt/unixODBC-2.3.0/doc/ProgrammerManual'
Making install in UserManual
make[2]: Entering directory '/opt/unixODBC-2.3.0/doc/UserManual'
make[3]: Entering directory '/opt/unixODBC-2.3.0/doc/UserManual'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/opt/unixODBC-2.3.0/doc/UserManual'
make[2]: Leaving directory '/opt/unixODBC-2.3.0/doc/UserManual'
Making install in lst
make[2]: Entering directory '/opt/unixODBC-2.3.0/doc/lst'
make[3]: Entering directory '/opt/unixODBC-2.3.0/doc/lst'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/opt/unixODBC-2.3.0/doc/lst'
make[2]: Leaving directory '/opt/unixODBC-2.3.0/doc/lst'
make[2]: Entering directory '/opt/unixODBC-2.3.0/doc'
make[3]: Entering directory '/opt/unixODBC-2.3.0/doc'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/opt/unixODBC-2.3.0/doc'
make[2]: Leaving directory '/opt/unixODBC-2.3.0/doc'
make[1]: Leaving directory '/opt/unixODBC-2.3.0/doc'
Making install in samples
make[1]: Entering directory '/opt/unixODBC-2.3.0/samples'
make[2]: Entering directory '/opt/unixODBC-2.3.0/samples'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/opt/unixODBC-2.3.0/samples'
make[1]: Leaving directory '/opt/unixODBC-2.3.0/samples'
make[1]: Entering directory '/opt/unixODBC-2.3.0'
make[2]: Entering directory '/opt/unixODBC-2.3.0'
make[2]: Nothing to be done for 'install-exec-am'.
touch /usr/local/etc/odbcinst.ini
touch /usr/local/etc/odbc.ini
mkdir -p /usr/local/etc/ODBCDataSources
/usr/local/bin/odbc_config --header > /usr/local/include/unixodbc_conf.h
make[2]: Leaving directory '/opt/unixODBC-2.3.0'
make[1]: Leaving directory '/opt/unixODBC-2.3.0'
root@kylin4:/opt/unixODBC-2.3.0#

检查:


dmdba@kylin4:~$ cd /usr/local/bin/
dmdba@kylin4:/usr/local/bin$ ls
dltest  isql  iusql  odbc_config  odbcinst
dmdba@kylin4:/usr/local/bin$ ls -l
总用量 444
-rwxr-xr-x 1 root root 155976 5月  12 16:18 dltest
-rwxr-xr-x 1 root root  82992 5月  12 16:18 isql
-rwxr-xr-x 1 root root  73128 5月  12 16:18 iusql
-rwxr-xr-x 1 root root  22216 5月  12 16:18 odbc_config
-rwxr-xr-x 1 root root 108880 5月  12 16:18 odbcinst
dmdba@kylin4:/usr/local/bin$
 

六、配置


root@kylin4:/opt/unixODBC-2.3.0# cd /usr/local/etc/
root@kylin4:/usr/local/etc# pwd
/usr/local/etc
root@kylin4:/usr/local/etc# ll
总用量 20
drwxr-xr-x  3 root root 4096 5月  11 22:18 ./
drwxr-xr-x 10 root root 4096 4月  12  2017 ../
drwxr-xr-x  2 root root 4096 5月  11 22:17 ODBCDataSources/
-rw-r--r--  1 root root  121 5月  12 16:18 odbc.ini
-rw-r--r--  1 root root   82 5月  12 16:18 odbcinst.ini
root@kylin4:/usr/local/etc# cat  odbc.ini
[DM8]
Description = DM ODBC DSN
Driver = DM8 ODBC DRIVER
SERVER = localhost    
UID = SYSDBA       
PWD = xxxxxxxxx     
TCP_PORT = 5236     

odbc.ini配置文件参数:

[DM8]
Description = DM ODBC DSN
Driver = DM8 ODBC DRIVER
SERVER = localhost     #(数据库IP)
UID = SYSDBA              #(数据用户)
PWD = xxxxxxxxx          #(数据库密码)
TCP_PORT = 5236       #(数据库端口)


root@kylin4:/usr/local/etc# cat  odbcinst.ini
[DM8 ODBC DRIVER]
Description = ODBC DRIVER FOR DM8
Driver = /dm8/bin/libdodbc.so
root@kylin4:/usr/local/etc#

检查dmdba用户环境变量 .bash_profile
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/dm8/bin"
export DM_HOME="/dm8"
export PATH="$DM_HOME/bin:$DM_HOME/tool:$PATH:$HOME/bin"

七、连接测试


root@kylin4:~# su - dmdba
dmdba@kylin4:~$ cat .bash_profile

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/dm8/bin"
export DM_HOME="/dm8"
export PATH="$DM_HOME/bin:$DM_HOME/tool:$PATH:$HOME/bin"
dmdba@kylin4:~$ isql dm8 -v
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select status$ from v$instance;
+---------------------------------------------------------------------------------------------------------------------------------+
| STATUS$                                                                                                                         |
+---------------------------------------------------------------------------------------------------------------------------------+
| OPEN                                                                                                                            |
+---------------------------------------------------------------------------------------------------------------------------------+
SQLRowCount returns 1
1 rows fetched
SQL>
 

测试成功。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值