sysbench安装for oracle
阅读原文时间:2023年07月10日阅读:1

RHEL7.2+
1.依赖包安装

\* autoconf
\* automake
\* cdbs
\* debhelper (>= 9)
\* docbook-xml
\* docbook-xsl
\* libmysqlclient15-dev
\* libtool
\* xsltproc

2.解压
tar -xzvf sysbench-0.5.tar.gz
chmod +x autogen.sh
3.执行autogen.sh
./autogen.sh
报错:
[root@rac2 sysbench-0.5]# ./autogen.sh
./autogen.sh: running `aclocal -I m4'
./autogen.sh: running `libtoolize --copy --force'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
./autogen.sh: running `autoheader'
./autogen.sh: running `automake -c --foreign --add-missing'
configure.ac:23: installing 'config/compile'
configure.ac:11: installing 'config/config.guess'
configure.ac:11: installing 'config/config.sub'
configure.ac:16: installing 'config/install-sh'
configure.ac:16: installing 'config/missing'
sysbench/Makefile.am: installing 'config/depcomp'
automake: warnings are treated as errors
/usr/share/automake-1.13/am/library.am: warning: 'libsbdrizzle.a': linking libraries using a non-POSIX
/usr/share/automake-1.13/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
sysbench/drivers/drizzle/Makefile.am:17: while processing library 'libsbdrizzle.a'
/usr/share/automake-1.13/am/library.am: warning: 'libsbmysql.a': linking libraries using a non-POSIX
/usr/share/automake-1.13/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
sysbench/drivers/mysql/Makefile.am:17: while processing library 'libsbmysql.a'
/usr/share/automake-1.13/am/library.am: warning: 'libsboracle.a': linking libraries using a non-POSIX
/usr/share/automake-1.13/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
sysbench/drivers/oracle/Makefile.am:17: while processing library 'libsboracle.a'
/usr/share/automake-1.13/am/library.am: warning: 'libsbpgsql.a': linking libraries using a non-POSIX
/usr/share/automake-1.13/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
sysbench/drivers/pgsql/Makefile.am:17: while processing library 'libsbpgsql.a'
/usr/share/automake-1.13/am/library.am: warning: 'libsbscript.a': linking libraries using a non-POSIX
/usr/share/automake-1.13/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
sysbench/scripting/Makefile.am:23: while processing library 'libsbscript.a'
/usr/share/automake-1.13/am/library.am: warning: 'liblua.a': linking libraries using a non-POSIX
/usr/share/automake-1.13/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
sysbench/scripting/lua/src/Makefile.am:17: while processing library 'liblua.a'
/usr/share/automake-1.13/am/library.am: warning: 'libsbcpu.a': linking libraries using a non-POSIX
/usr/share/automake-1.13/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
sysbench/tests/cpu/Makefile.am:17: while processing library 'libsbcpu.a'
/usr/share/automake-1.13/am/library.am: warning: 'libsbfileio.a': linking libraries using a non-POSIX
/usr/share/automake-1.13/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
sysbench/tests/fileio/Makefile.am:17: while processing library 'libsbfileio.a'
/usr/share/automake-1.13/am/library.am: warning: 'libsbmemory.a': linking libraries using a non-POSIX
/usr/share/automake-1.13/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
sysbench/tests/memory/Makefile.am:17: while processing library 'libsbmemory.a'
/usr/share/automake-1.13/am/library.am: warning: 'libsbmutex.a': linking libraries using a non-POSIX
/usr/share/automake-1.13/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
sysbench/tests/mutex/Makefile.am:17: while processing library 'libsbmutex.a'
/usr/share/automake-1.13/am/library.am: warning: 'libsbthreads.a': linking libraries using a non-POSIX
/usr/share/automake-1.13/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
sysbench/tests/threads/Makefile.am:17: while processing library 'libsbthreads.a'
Can't execute automake

修改configure.ac
[root@rac2 sysbench-0.5]# vi configure.ac
添加AM_PROG_AR

AC_PROG_CC

AM_PROG_AR

AC_PROG_CPP
4.configure
报错:
configure: error: *** pthread_once() is not available on this platform ***
注释掉使用到的地方:
285 #AC_CHECK_FUNC(pthread_once, ,
286 # AC_MSG_ERROR([*** pthread_once() is not available on this platform ***])
287 #)
执行:
./configure --with-oracle --without-mysql --without-pgsql
5.make
make ORA_LIBS=/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so
6.make install
7.设置参数
[root@rac2 share]# su - oracle
Last login: Thu Mar 16 09:55:18 CST 2017 on pts/2
[oracle@rac2 ~]$ cat .bash_profile

export CC=cc
export CXX=c++
export CFLAGS="-m64 -I /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/public"
export CXXFLAGS="$CFLAGS"
export LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/dbhome_1/lib
7.测试连接:
export LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/dbhome_1/lib/
./sysbench --oracle-db=orcl --oracle-user=system --oracle-password=oracle --db-driver=Oracle --test=/usr/sysbench-0.5/sysbench/tests/db/select.lua run

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器

你可能感兴趣的文章