安装sysbench
下载并且解压
shell> wget https://github.com/akopytov/sysbench/archive/1.0.zip -O "sysbench-1.0.zip"
shell> unzip sysbench-1.0.zip
shell> cd sysbench-1.0
安装依赖
shell> yum install automake libtool -y
开始安装
./configure --prefix=/usr/sysbench/ --with-mysql-includes=/usr/local/mysql/include --with-mysql-libs=/usr/local/mysql/lib && make && make install
安装环境变量
export PATH="$PATH:/usr/local/redis/bin:/usr/local/php/bin:/usr/sysbench/bin"
重启profile
source /etc/profile
测试命令
sysbench --version
sysbench --help