首页 > 代码库 > sysbench0.5 在 centos7下安装 (mysql-community-server)
sysbench0.5 在 centos7下安装 (mysql-community-server)
mysql-community-server 5.7
// 先安装编译依赖环境
$ sudo yum install gcc gcc-c++ automake make libtool mysql-community-devel
$ cd /tmp && git clone https://github.com/akopytov/sysbench.git
$ cd /tmp/sysbench && ./autogen.sh
$ ./configure --prefix=/usr/local/sysbench-0.5 --with-mysql
$ make
$ make install
$ cd /usr/local/sysbench-0.5/bin
$ ./sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=root --mysql-host=127.0.0.1 --mysql-password=123456 prepare
$ ./sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=root --mysql-host=127.0.0.1 --mysql-password=123456 --max-time=60 --oltp-read-only=on --max-requests=0 --num-threads=8 run
$ ./sysbench --test=fileio --file-total-size=5G prepare
$ ./sysbench --test=fileio --file-total-size=5G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run
$ ./sysbench --test=fileio --file-total-size=5G cleanup
sysbench0.5 在 centos7下安装 (mysql-community-server)