#Linux安装sysbench
Yum install gcc autoconf automake libtool-y
Tar-zxv-f sysbench-0.4.12
#mysql源码安装需要指定MySQL的库文件位置 (-with-mysql-includes–with-mysql-libs option)
CD sysbench-0.4.12
./configure--with-mysql-includes=/usr/local/mysql/include--with-mysql-libs=/usr/local/mysql/lib
Make && make install
#常见报错
.. /libtool:line 841:x--tag=cc:command not found
.. /libtool:line 874:libtool:ignoring unknown Tag:command not found
.. /libtool:line 841:x--mode=link:command not found
.. /libtool:line 1007: * * * warning:inferring the mode of operation is deprecated.: Command not Found
.. /libtool:line 1008: * * * Future versions of Libtool would require--mode=mode be specified.: Command not Found
.. /libtool:line 2234:x-g:command not found
.. /libtool:line 2234:x-o2:command not found
.. /libtool:line 1954:x-l/usr/local/mysql/lib:no such file or directory
.. /libtool:line 2403:xsysbench:command not found
#cause
Sysbench Libtool is inconsistent with system Libtool version (?)
#solve
Vim./aclocal.m4
Libtool= ' $ (shell) $ (Top_builddir)/libtool ' modified to ' $ (shell)/usr/bin/libtool ', even with the system's LIBTOOL toolkit.
Make && make install
Sysbench
Sysbench:error while loading shared libraries:libmysqlclient.so.18:cannot open Shared object file:no such file or dire Ctory (maybe)
Ln-s/usr/local/mysql/lib/libmysqlclient.so.18/usr/lib64/#64位系统lib64 32-bit system lib (uname-a)
#测试mysql
Generate Data
Sysbench--test=oltp--mysql-table-engine=innodb--oltp-table-size=1000000--mysql-user=*--mysql-host=*-- mysql-port=6202--mysql-socket=/data/mysql/mysql.sock--mysql-password=*--mysql-db=fzclassroom--db-driver=mysql Prepare
Output report
Sysbench--mysql-db=sbtest--max-requests=0--TEST=OLTP--mysql-engine-trx=yes--mysql-table-engine=innodb-- oltp-table-size=1000000--db-ps-mode=disable--mysql-user=jike_pdd--mysql-host=*--mysql-port=6202--mysql-socket= /data/mysql/mysql.sock--mysql-password=*--mysql-db=fzclassroom--db-driver=mysql--num-threads=16--max-time=600 Run
Linux installation Sysbench