sysbench --with-mysql-libs_linux安装sysbench

标签:

#Linux安装sysbench

yum install gcc autoconf automake libtool -y

tar -zxv -f sysbench-0.4.12

#mysql源码安装需要指定MySQL的库文件位置 (—with—mysql-includes –with-mysql-libs选项)

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 will 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与系统libtool版本不一致(?)

#solve

vim ./aclocal.m4

LIBTOOL=‘$(SHELL) $(top_builddir)/libtool‘ 修改为 ‘$(SHELL) /usr/bin/libtool‘,即使用系统的libtool工具包.

make && make install

sysbench

sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory(maybe)

ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64/ #64位系统lib64 32位系统lib(uname -a)

#测试mysql

生成数据

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

输出报告

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

标签:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值