下载安装:
下载地址:https://github.com/akopytov/sysbench
yum -y install make automake libtool pkgconfig libaio-devel mariadb-devel openssl-devel unzip sysbench-master.zip cd sysbench-master ./autogen.sh ./configure --prefix=/usr/local/sysbench/ --with-mysql --with-mysql-includes=/usr/local/mysql/include --with-mysql-libs=/usr/local/mysql/lib make && make install ln -s /usr/local/sysbench/bin/* /usr/bin/
测试安装是否成功:
[root@db254 sysbench-master]# /usr/local/sysbench/bin/sysbench --version sysbench 1.1.0
如果遇到下面问题:
[root@db254 sysbench-master]# /usr/local/sysbench/bin/sysbench --version
/usr/local/sysbench/bin/sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
解决方式:
cp /usr/local/mysql/lib/libmysqlclient.so.18 /lib64
文章来源: https://blog.csdn.net/u012976052/article/details/90906523