ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Sysbench的安装和使用

Sysbench的安装和使用

原创 Linux操作系统 作者:nep_yin 时间:2012-11-14 11:03:16 0 删除 编辑

一、下载

二、安装

[root@localhost sysbench]#./configure

–with-mysql-includes=/opt/mysql/include/mysql 表示mysql头文件目录

–with-mysql-libs=/opt/mysql/lib/mysql表示mysql模块目录

[root@localhost ]

[root@localhost sysbench]# make && make install 

PS:

  1. 在安装前最好先更新libtool 和gcc
  2. mysql的头文件目录和模块目录注意自己查找。即使是默认安装,文件目录页可能不同。
  3. 西顾安装时,碰到了 sysbench: error while loading shared libraries: libmysqlclient_r.so.15: cannot open shared object file: No such file or directory 的安装错误,但是西顾在mysql的木块目录下看到了 libmysqlclient_r.so.16的文件,一直没有解决,最后将sysbench-0.4.12换成了sysbench-0.4.8之后没有再抱着个错
  4. 如果安装时出现以下错误:
 ../libtool: line 838: X--tag=CC: command not found

../libtool: line 871: libtool: ignoring unknown tag : command not found

../libtool: line 838: X--mode=link: command not found

../libtool: line 1004: *** Warning: inferring the mode of operation is deprecated.: command not found

../libtool: line 1005: *** Future versions of Libtool will require --mode=MODE be specified.: command not found

../libtool: line 2231: X-g: command not found

../libtool: line 2231: X-O2: command not found

../libtool: line 2231: X-rdynamic: command not found

../libtool: line 1951: X-L/usr/lib/mysql: No such file or directory

../libtool: line 2400: Xsysbench: command not found

Fatal server error:

Server is already active for display 0

If this server is no longer running, remove /tmp/.X0-lock

and start again.

../libtool: line 2412: Xsysbench: command not found

../libtool: line 2547: X-lmysqlclient_r: command not found

../libtool: line 2547: X-lz: command not found

../libtool: line 2547: X-lcrypt: command not found

../libtool: line 2547: X-lnsl: command not found

../libtool: line 2547: X-lm: command not found

../libtool: line 2547: X-lmygcc: command not found

../libtool: line 2547: X-lrt: command not found

../libtool: line 2547: X-lm: command not found

../libtool: line 2629: X-L/root/tool/sysbench-0.4.12/sysbench: No such file or directory

../libtool: line 2547: X-lmysqlclient_r: command not found

../libtool: line 2547: X-lz: command not found

../libtool: line 2547: X-lcrypt: command not found

../libtool: line 2547: X-lnsl: command not found

../libtool: line 2547: X-lmygcc: command not found

../libtool: line 2547: X-lrt: command not found

../libtool: line 2547: X-lm: command not found

../libtool: line 2629: X-L/root/tool/sysbench-0.4.12/sysbench: No such file or directory

../libtool: line 2547: X-lmysqlclient_r: command not found

../libtool: line 2547: X-lz: command not found

../libtool: line 2547: X-lcrypt: command not found

../libtool: line 2547: X-lnsl: command not found

../libtool: line 2547: X-lmygcc: command not found

../libtool: line 2547: X-lrt: command not found

../libtool: line 2547: X-lm: command not found

../libtool: line 5162: Xgcc -pthread "" "" -o @OUTPUT@ sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o "" tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/root/tool/sysbench-0.4.12/sysbench -lmysqlclient_r -lz -lcrypt -lnsl -lmygcc -lrt -lm: No such file or directory

../libtool: line 5163: Xgcc -pthread "" "" -o @OUTPUT@ sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o "" tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/root/tool/sysbench-0.4.12/sysbench -lmysqlclient_r -lz -lcrypt -lnsl -lmygcc -lrt -lm: No such file or directory

有几个解决办法:
第一,没有更新libtool
第二,执行./autogen.sh(sysbench解压包下),如果没有表示版本不支持
第三,在./configure之后 ,把  /usr/bin/libtool 复制到sysbench解压包下覆盖原来的libtool 

三、sysbench的使用

具体的参数解释请看 :http://www.yiyon.net/?p=312
sysbench的使用实例请看:http://7567567.blog.51cto.com/706378/583949

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

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

注册时间:2011-07-08

  • 博文量
    11
  • 访问量
    22373