First, get the installation package
: http://sourceforge.net/projects/sysbench/
Second, compile and install
My environment for CentOS 6.4 + MySQL 5.5.30,
Copy the code code as follows:
[Email protected] mysqlbak]# TAR-XVF Sysbench-0.4.12.tar
[Email protected] mysqlbak]# CD sysbench-0.4.12
[Email protected] mysqlbak]#./autogen.sh
[Email protected] mysqlbak]#/configure--with-mysql-includes=/usr/local/mysql/include--with-mysql-libs=/usr/ Local/mysql/lib && make && make install
Because my MySQL is compiled and installed, I need to give the MySQL library file location (corresponding to the-with-mysql-includes and –with-mysql-libs options).
Common errors during the installation process are as follows:
Copy the code code as follows:
.. /libtool:line 841:x--tag=cc:command not found
.. /libtool:line 874:libtool:ignoring unknown Tag:command not found
.. /libtool:line 841:x--mode=link:command not found
.. /libtool:line 1007: * * * warning:inferring the mode of operation is deprecated.: Command not Found
.. /libtool:line 1008: * * * Future versions of Libtool would require--mode=mode be specified.: Command not Found
.. /libtool:line 2234:x-g:command not found
.. /libtool:line 2234:x-o2:command not found
.. /libtool:line 1954:x-l/app/programs/mysql/lib:no such file or directory
.. /libtool:line 2403:xsysbench:command not found
.. /libtool:line 2408:x: Command not found
.. /libtool:line 2415:xsysbench:command not found
.. /libtool:line 2550:x-lmysqlclient_r:command not found
.. /libtool:line 2550:x-lrt:command not found
.. /libtool:line 2550:x-lm:command not found
.. /libtool:line 2632:x-l/database/mysqlbak/sysbench-0.4.12/sysbench:no such file or directory
.. /libtool:line 2550:x-lmysqlclient_r:command not found
.. /libtool:line 2550:x-lrt:command not found
.. /libtool:line 2550:x-lm:command not found
.. /libtool:line 2632:x-l/database/mysqlbak/sysbench-0.4.12/sysbench:no such file or directory
.. /libtool:line 2550:x-lmysqlclient_r:command not found
.. /libtool:line 2550:x-lrt:command not found
.. /libtool:line 2550:x-lm:command not found
In general, we only need to execute the autogen.sh script in the Sysbench decompression directory before the compile operation, or to execute the script or to report the error because Sysbench has a problem with libtool, compare it and/usr/bin/ The difference between the Libtool file is known, by replacing the Libtool file to resolve, or modify the Aclocal.m4 file the following content
Copy the code code as follows:
# Always use our own libtool.
Libtool= ' $ (SHELL) $ (top_builddir)/libtool '
Ac_subst (LIBTOOL) DNL
Modify the Libtool variable's ' $ (shell) $ (top_builddir)/libtool ' to: ' $ (shell)/usr/bin/libtool ', even with the system's Libtool toolkit.
Re-install
[[email protected] mysqlbak]# make && make install
Installation of sysbench-0.4.12