下载地址
wget https://github.com/akopytov/sysbench/archive/1.0.zip
安装
* 基本步骤
yum -y install make automake libtool pkgconfig libaio-devel vim-common
cd sysbench-master
./autogen.sh
./configure --with-mysql-includes=/usr/local/mysql/include --with-mysql-libs=/usr/local/mysql/lib/ #这里是mysql的安装目录,不是用的rpm安装的,用的是源码编译安装的
make
make install
* 过程中可能会遇到的故障
sysbench: error while loading shared libraries: libmysqlclient.so.20: cannot open shared
object file: No such file or directory
* 解决方案
export LD_LIBRARY_PATH=/usr/local/mysql/lib/
* 测试是否安装成功
shell> sysbench --version
sysbench 1.0
它可以用来测试很多东西,测试io,cpu,mem,mysql,oracle,pg等等