林书磊 發表於 2022-11-23 13:59:00

Sysbench安装最新版本(Debian/Ubuntu/RHEL/CentOS/Fedora)

<p><span><span style="color: rgba(0, 0, 255, 1)"><strong>重要说明:sysbench在Git上的各个版本二进制包下载路径:https://github.com/akopytov/sysbench/releases</strong></span></span></p>
<p><span>如下的2种安装方式,任选一种即可</span></p>
<h2><span>第一种:Quick install instructions:</span></h2>
<div class="cnblogs_code">
<pre><span style="color: rgba(128, 128, 128, 1)">-</span> Debian<span style="color: rgba(128, 128, 128, 1)">/</span><span style="color: rgba(0, 0, 0, 1)">Ubuntu
``` shell
curl </span><span style="color: rgba(128, 128, 128, 1)">-</span>s https:<span style="color: rgba(128, 128, 128, 1)">//</span>packagecloud.io<span style="color: rgba(128, 128, 128, 1)">/</span>install<span style="color: rgba(128, 128, 128, 1)">/</span>repositories<span style="color: rgba(128, 128, 128, 1)">/</span>akopytov<span style="color: rgba(128, 128, 128, 1)">/</span>sysbench<span style="color: rgba(128, 128, 128, 1)">/</span>script.deb.sh <span style="color: rgba(128, 128, 128, 1)">|</span><span style="color: rgba(0, 0, 0, 1)"> sudo bash
sudo apt </span><span style="color: rgba(128, 128, 128, 1)">-</span><span style="color: rgba(0, 0, 0, 1)">y install sysbench
```

</span><span style="color: rgba(128, 128, 128, 1)">-</span> RHEL<span style="color: rgba(128, 128, 128, 1)">/</span><span style="color: rgba(0, 0, 0, 1)">CentOS:
``` shell
curl </span><span style="color: rgba(128, 128, 128, 1)">-</span>s https:<span style="color: rgba(128, 128, 128, 1)">//</span>packagecloud.io<span style="color: rgba(128, 128, 128, 1)">/</span>install<span style="color: rgba(128, 128, 128, 1)">/</span>repositories<span style="color: rgba(128, 128, 128, 1)">/</span>akopytov<span style="color: rgba(128, 128, 128, 1)">/</span>sysbench<span style="color: rgba(128, 128, 128, 1)">/</span>script.rpm.sh <span style="color: rgba(128, 128, 128, 1)">|</span><span style="color: rgba(0, 0, 0, 1)"> sudo bash
sudo yum </span><span style="color: rgba(128, 128, 128, 1)">-</span><span style="color: rgba(0, 0, 0, 1)">y install sysbench
```

</span><span style="color: rgba(128, 128, 128, 1)">-</span><span style="color: rgba(0, 0, 0, 1)"> Fedora:
``` shell
curl </span><span style="color: rgba(128, 128, 128, 1)">-</span>s https:<span style="color: rgba(128, 128, 128, 1)">//</span>packagecloud.io<span style="color: rgba(128, 128, 128, 1)">/</span>install<span style="color: rgba(128, 128, 128, 1)">/</span>repositories<span style="color: rgba(128, 128, 128, 1)">/</span>akopytov<span style="color: rgba(128, 128, 128, 1)">/</span>sysbench<span style="color: rgba(128, 128, 128, 1)">/</span>script.rpm.sh <span style="color: rgba(128, 128, 128, 1)">|</span><span style="color: rgba(0, 0, 0, 1)"> sudo bash   
sudo dnf </span><span style="color: rgba(128, 128, 128, 1)">-</span>y install sysbench</pre>
</div>
<h2>&nbsp;第二种:Building and Installing From Source</h2>
<p>请在Git上下载sysbench二进制安装包,并解压,Git地址:https://github.com/akopytov/sysbench/releases/tag/1.0.20。</p>
<div class="cnblogs_code">
<pre>### Debian<span style="color: rgba(128, 128, 128, 1)">/</span><span style="color: rgba(0, 0, 0, 1)">Ubuntu
``` shell
    apt </span><span style="color: rgba(128, 128, 128, 1)">-</span>y install make automake libtool pkg<span style="color: rgba(128, 128, 128, 1)">-</span>config libaio<span style="color: rgba(128, 128, 128, 1)">-</span><span style="color: rgba(0, 0, 0, 1)">dev
    # </span><span style="color: rgba(0, 0, 255, 1)">For</span><span style="color: rgba(0, 0, 0, 1)"> MySQL support
    apt </span><span style="color: rgba(128, 128, 128, 1)">-</span>y install libmysqlclient<span style="color: rgba(128, 128, 128, 1)">-</span>dev libssl<span style="color: rgba(128, 128, 128, 1)">-</span><span style="color: rgba(0, 0, 0, 1)">dev
    # </span><span style="color: rgba(0, 0, 255, 1)">For</span><span style="color: rgba(0, 0, 0, 1)"> PostgreSQL support
    apt </span><span style="color: rgba(128, 128, 128, 1)">-</span>y install libpq<span style="color: rgba(128, 128, 128, 1)">-</span><span style="color: rgba(0, 0, 0, 1)">dev
```

### RHEL</span><span style="color: rgba(128, 128, 128, 1)">/</span><span style="color: rgba(0, 0, 0, 1)">CentOS
``` shell
    yum </span><span style="color: rgba(128, 128, 128, 1)">-</span>y install make automake libtool pkgconfig libaio<span style="color: rgba(128, 128, 128, 1)">-</span><span style="color: rgba(0, 0, 0, 1)">devel
    # </span><span style="color: rgba(0, 0, 255, 1)">For</span> MySQL support, <span style="color: rgba(255, 0, 255, 1)">replace</span> <span style="color: rgba(0, 0, 255, 1)">with</span> mysql<span style="color: rgba(128, 128, 128, 1)">-</span>devel <span style="color: rgba(0, 0, 255, 1)">on</span> RHEL<span style="color: rgba(128, 128, 128, 1)">/</span>CentOS <span style="color: rgba(128, 0, 0, 1); font-weight: bold">5</span><span style="color: rgba(0, 0, 0, 1)">
    yum </span><span style="color: rgba(128, 128, 128, 1)">-</span>y install mariadb<span style="color: rgba(128, 128, 128, 1)">-</span>devel openssl<span style="color: rgba(128, 128, 128, 1)">-</span><span style="color: rgba(0, 0, 0, 1)">devel
    # </span><span style="color: rgba(0, 0, 255, 1)">For</span><span style="color: rgba(0, 0, 0, 1)"> PostgreSQL support
    yum </span><span style="color: rgba(128, 128, 128, 1)">-</span>y install postgresql<span style="color: rgba(128, 128, 128, 1)">-</span><span style="color: rgba(0, 0, 0, 1)">devel
```

### Fedora
``` shell
    dnf </span><span style="color: rgba(128, 128, 128, 1)">-</span>y install make automake libtool pkgconfig libaio<span style="color: rgba(128, 128, 128, 1)">-</span><span style="color: rgba(0, 0, 0, 1)">devel
    # </span><span style="color: rgba(0, 0, 255, 1)">For</span><span style="color: rgba(0, 0, 0, 1)"> MySQL support
    dnf </span><span style="color: rgba(128, 128, 128, 1)">-</span>y install mariadb<span style="color: rgba(128, 128, 128, 1)">-</span>devel openssl<span style="color: rgba(128, 128, 128, 1)">-</span><span style="color: rgba(0, 0, 0, 1)">devel
    # </span><span style="color: rgba(0, 0, 255, 1)">For</span><span style="color: rgba(0, 0, 0, 1)"> PostgreSQL support
    dnf </span><span style="color: rgba(128, 128, 128, 1)">-</span>y install postgresql<span style="color: rgba(128, 128, 128, 1)">-</span><span style="color: rgba(0, 0, 0, 1)">devel
```</span></pre>
</div>
<p>示例:如上根据自己的操作系统执行如上安装操作已完成之后,则执行如下的构建操作</p>
<div class="cnblogs_code">
<pre>## Build <span style="color: rgba(128, 128, 128, 1)">and</span><span style="color: rgba(0, 0, 0, 1)"> Install
``` shell
    .</span><span style="color: rgba(128, 128, 128, 1)">/</span><span style="color: rgba(0, 0, 0, 1)">autogen.sh
    # </span><span style="color: rgba(0, 0, 255, 1)">Add</span> <span style="color: rgba(0, 128, 128, 1)">--</span><span style="color: rgba(0, 128, 128, 1)">with-pgsql to build with PostgreSQL support</span>
    .<span style="color: rgba(128, 128, 128, 1)">/</span><span style="color: rgba(0, 0, 0, 1)">configure
    make </span><span style="color: rgba(128, 128, 128, 1)">-</span><span style="color: rgba(0, 0, 0, 1)">j
    make install
```</span></pre>
</div>
<p>安装完成后,执行sysbench --version查看是否安装成功</p>
<p>&nbsp;</p>

</div>
<div id="MySignature" role="contentinfo">
    <table style="background: rgb(230, 250, 230); padding: 10px 10px 10px 10px; border: 1px dashed rgb(224, 224, 224); font-family: 微软雅黑; font-size: 13px"><tbody><tr><td>
1.作者:Syw <br>
2.出处:http://www.cnblogs.com/syw20170419/ <br>
3.本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 <br>
4.如果文中有什么错误,欢迎指出。以免更多的人被误导。 <br>
</td><td align="right">
<div id="qr_bg"></div>
</td></tr></tbody></table><br><br>
来源:https://www.cnblogs.com/syw20170419/p/16918087.html
頁: [1]
查看完整版本: Sysbench安装最新版本(Debian/Ubuntu/RHEL/CentOS/Fedora)