sysbench部署

sysbench作为每一个系统管理员,都应该被用过,因为它实在太有点能耐~

操作系统:Debian8

数据库版本:MySQL 5.6.X

sysbench版本:1.0

>

  • 安装依赖包

    > apt-get install m4 autoconf automake libtool
    >

>

  • 切换至sysbench安装目录,运行autogen.sh脚本

    > cd /usr/local/sysbench
    > ./autogen.sh
    >

>

  • 运行configure

    > # /usr/local/mysql为MySQL安装目录
    > ./configure --with-mysql-includes=/usr/local/mysql/include --with-mysql-libs=/usr/local/mysql/lib
    >
    > # 如果此处使用的是Mariadb,则includes路径为/usr/local/mysql/include/mysql
    >

>

  • 运行make

    > make
    >

>

  • 软链sysbench

    > ln -s /usr/local/sysbench/sysbench/sysbench /usr/bin/sysbench
    >

至此,sysbench安装完成啦~