1.sysbench介绍
sysbench是一款开源的多线程性能测试工具,可以执行CPU/内存/线程/IO/数据库等方面的性能测试。
2.下载安装包
wget https://github.com/akopytov/sysbench/archive/1.0.zip -O "sysbench-1.0.zip"
3.解压安装包
unzip sysbench-1.0.zip
cd sysbench-1.0
4.开始安装
./autogen.sh
./configure
#ERROR: cannot find MySQL libraries. If you want to compile with MySQL support 没找到mysql库 需要用参数指定下 --with-mysql-includes和--with-mysql-libs
5.如何查找mysql的安装路径?
安装mysql-devel,使用mysql_config查看mysql的安装路径
yum install -y mysql-devel
mysql_config -help
再次执行./configure,成功。
./configure --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib64/mysql
make
make install
使用如下命令测试是否安装成功
sysbench --version