1: Install the Epel package:
RPM-UVH http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
2:
Yum Install BZR
The error:
--Finished Dependency resolutionerror:package:python-paramiko-1.7.6-1.el5.noarch (Epel) Requires:python ( ABI) = 2.4 installed:python-2.6.6-36.el6.x86_64 (@anaconda-centos-201303020151.x86_64/6.4) python (ABI) = 2.6 available:python-2.6.6-52.el6.x86_64 (base) python (ABI) = 2.6 available:python26-2.6.8-2.el5.x86_ (Epel) python (ABI) = 2.6 You could try using--skip-broken to work around the problem you could try Running:rpm-v A--nofiles--nodigest
Solution:
CD/ETC/YUM.REPOS.D/MV Epel.repo Epel.repo.bak
Reinstall:
Yum Install BZR
3: Download the source code
BZR Branch Lp:~percona-dev/perconatools/tpcc-mysql
[Email protected] software]# BZR Branch Lp:~percona-dev/perconatools/tpcc-mysqlyou has not informed BZR of your LAUNCHPA D ID, and you must does this towrite to Launchpad or access private data. See "Bzr help Launchpad-login"./ 163KB
Also have to register ....
4: Use the source code on the Internet (from Ye Jinlong teacher)
wget http://imysql.com/wp-content/uploads/2014/09/tpcc-mysql-src.tgz
TAR-XVF Tpcc-mysql-src.tar
Tpcc-mysql's business logic and several of its related tables function as follows: New-order: New orders, a complete order transaction, almost all tables payment: payment, main corresponding orders, history table Order-status: Order status, The main correspondence orders, Order_line table delivery: Delivery, mainly corresponds to the Order_line table Stock-level: Inventory, the main corresponding to the stock table other related tables: Customers: Main Customer table region: main correspondence District Table Commodity: Main Correspondence Item table warehouse: Main Correspondence Warehouse Table
5: Compiling the installation
#如果 make without error, the TPCC binary command line tool tpcc_load, Tpcc_startcd/tpcc-mysql/srcmake, is generated under/tpcc-mysql.
Error:
Load.c:in function? Rror?. load.c:1242:error:expected declaration specifiers before? Ysql_stmt?load.c:1248:error:?. Ysql?. Undeclared (first use with this function) make: * * * [LOAD.O] Error 1
Solution:
Vim/etc/profileexport mysql_home=/usr/local/mysql/export c_inlude_path= $MYSQL _home/includeexport LD_LIBRARY_PATH= $MYSQL _home/libexport path= $MYSQL _home/bin: $PATHsource/etc/profile
Recompile:
Make
[Email protected] tpcc-mysql]# lltotal 248-rw-r--r--. 1 root root 1621 Sep add_fkey_idx.sql-rw-r--r--. 1 root root 317 Sep count.sql-rw-r--r--. 1 root root 3105 Sep create_table.sql-rw-r--r--. 1 root root 763 Sep drop_cons.sql-rw-r-- R--. 1 root root 477 Sep load.sh-rw-r--r--. 1 root root 851 Sep readmedrwxr-xr-x. 2 root root 4096 Sep schema2drwxr-xr-x. 5 root root 4096 Sep scriptsdrwxr-xr-x. 2 root root 4096 May 02:54 src-rwxr-xr-x. 1 root root 60273 may 02:54 tpcc_load-rwxr-xr-x. 1 root root 154064.02:54 Tpcc_start
6: Initializing the test library
Mysqladmin Create Tpcc1000mysql-f tpcc1000 < Create_table.sql
Or:
mysql> CREATE DATABASE tpcc1000; Query OK, 1 row affected (0.04 sec) mysql> use tpcc1000;database changedmysql> source/root/software/tpcc-mysql/crea Te_table.sql
Ln-s/var/lib/mysql/mysql.sock/tmp/mysql.sock./tpcc_load localhost tpcc1000 root "ge0513" 1000
Tpcc-mysql Series One: Installation and use