Sysbench的安装

本文介绍了如何在Linux环境中安装Sysbench。首先解压sysbench-0.4.12目录,然后通过运行`./configure`,接着使用`make && make install`进行编译和安装。默认安装路径为/usr/local,但可以通过`--prefix`参数自定义安装位置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

步骤一: 安装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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值