Sysbench的安装

来源:互联网 发布:手机淘宝申请售后流程 编辑:程序博客网 时间:2024/05/17 09:29
步骤一: 安装libtool
1. 下载libtool
wget http://ftp.gnu.org/gnu/libtool/libtool-2.4.tar.xz

2. 解压libtool
tar xf libtool-2.4.tar.xz

3. 安装三部曲
./configure
make && make install
默认的安装路径在:/usr/local/bin/libtool
./libtool --version

步骤二: 安装sysbench
1. 下载sysbench
http://nchc.dl.sourceforge.net/project/sysbench/sysbench/0.4.12/sysbench-0.4.12.tar.gz

2. 解压进入sysbench-0.4.12目录

先编译源文件:

[root@mysqltest-204168 sysbench-0.4.12]# ./configure 

然后查看libtool的版本,会发现自带的版本有问题
[root@localtest-205 sysbench-0.4.12]# ./libtool --version
./libtool: line 896: ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06): No such file or directory
./libtool: line 898: Copyright (C) 2005  Free Software Foundation, Inc.: command not found
./libtool: line 899: This is free software; see the source for copying conditions.  There is NO: command not found
./libtool: line 900: warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.: command not found

将刚才安装的libtool拷贝到sysbench文件夹中
cp -v /usr/local/bin/libtool ./

再次查看libtool的版本

[root@localtest-205 sysbench-0.4.12]# ./libtool --version
libtool (GNU libtool) 2.4
Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996

Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


3. 三部曲安装sysbench
./configure --prefix=/usr/local/sysbench --with-mysql-includes=/usr/local/mysql/include/mysql/ --with-mysql-libs=/usr/local/mysql/lib/mysql/

make && make install

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.


查看sysbench的版本:
[root@localtest-205 bin]# /usr/local/bin/sysbench --version
sysbench 0.4.12
0 0