Friday, July 27, 2012

Installing sysbench from launchpad source on CentOS 6

Sysbench is used to benchmark servers on MySQL performance.  Though sysbench is available in official repositories, the version available on launchpad is capable of benchmarking load on multiple tables.  Since there's no package for it, we have to build it ourselves.  Here's how:

1.  Install compiler tools to compile the source 
yum -y install gcc gcc-c++ autoconf automake make libtool

2.  Install bzr so you download the source from the repository
yum -y install bzr

3.  Install MySQL dependencies to build sysbench:
yum -y install mysql mysql-server mysql-devel

4.  Download sysbench
bzr branch lp:sysbench

5.  Compile and install sysbench
cd sysbench
./autogen.sh
./configure --prefix=/usr --mandir=/usr/share/man
make
make install

6.  Copy lua templates
mkdir /usr/share/sysbench/tests/db -p
cp tests/db/* /usr/share/sysbench/tests/db

7.  Test if sysbench is working

sysbench
Missing required command argument.
Usage:
  sysbench [general-options]... --test=<test-name> [test-options]... command




No comments: