Today, I encountered a lot of problems when installing the MySQL stress testing tool sysbench. Although there are many installation examples on the Internet, they are not accurate enough, or they are not very similar to my own environment, as a result, it takes a lot of energy to complete the compilation and installation, and now record the installation process, in order to avoid excessive detours in the future.
(1) installation environment
CentOS release 5.4 (Final) 2.6.18-164. el5
MySQL 5.1.40 MySQL_HOME =/usr/local/mysql/
Sysbench 0.4.12
(2) installation steps:
1. Go to http://sourceforge.net/projects/sysbench/and download the latest sysbench 0.4.12.
---Sysbench-0.4.12.tar.gz
2. Decompress sysbench-0.4.12.tar.gz
Shell> tar-zxvf sysbench-0.4.12.tar.gz
3. Enter the extract package sysbench-0.4.12 and execute the script autogen. sh
Shell> cd sysbench-0.4.12
Shell>./autogen. sh
4. Key trilogy: configure & make install
First. /configure command. sysbench supports MySQL benchmarking by default. If no option is added, ensure that the installation path of MySQL is the default standard path. The headfile is located in the/usr/include directory, libraries is located in the/usr/lib/directory. Because my MySQL is compiled and installed by source code, and the installation path is under/usr/local/mysql, you need to add the corresponding option command here:
Shell>. /configure-prefix =/usr/local/mysql-with-mysql-Primary des =/usr/local/mysql/include/mysql/ -- with-mysql-libs =/usr/local/mysql/lib/mysql/
Note: after repeated tests, we need to write the path to the final include/mysql, lib/mysql during compilation.
-With-mysql-des =/usr/local/mysql/include/mysql/
-- With-mysql-libs =/usr/local/mysql/lib/mysql/
Because this layer is not mentioned in many materials on the Internet, it is always unable to compile during compilation, which wastes a lot of energy.
The following is simple:
Shell> make
Shell> make install
So far, OK ~~~