码迷,mamicode.com
首页 > 系统相关 > 详细

linux安装sysbench

时间:2015-01-04 15:07:34      阅读:297      评论:0      收藏:0      [点我收藏+]

标签:

#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

linux安装sysbench

标签:

原文地址:http://www.cnblogs.com/metasequoia/p/4201066.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!