如何安装使用sysbench

  

本篇文章为大家展示了如何安装使用sysbench,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。

yum  -y  install  make  automake  libtool  pkgconfig  libaio-devel   yum  -y  install  mysql-devel  openssl-devel   unzip  sysbench-master.zip   。/任务   。/configure ——with-mysql-includes=/usr/地方/mysql/include ——with-mysql-libs=/usr/地方/mysql/lib   make ,,, make 安装

需要设置环境变量

[root@dpcm01  sysbench-master] #, sysbench   sysbench: error  while  loading  shared 库:,libmysqlclient.so.20:, cannot  open  shared  object 文件:,No  such  file 或是目录   [root@dpcm01  sysbench-master] #, echo  LD_LIBRARY_PATH美元   [root@dpcm01  sysbench-master] #, echo  LD_LIBRARY_PATH美元   [root@dpcm01  sysbench-master] #,   [root@dpcm01  sysbench-master] #, export  LD_LIBRARY_PATH=/usr/地方/mysql/lib   [root@dpcm01  sysbench-master] #,   [root@dpcm01  sysbench-master] # sysbench   sysbench  1.1.0  (using  bundled  LuaJIT  2.1.0-beta3)   Reading 从而,script 得到,standard 输入:   [root@dpcm01  lua] #, sysbench  oltp_read_write.lua ,——mysql-socket=/数据/mysql/mysql.sock ——mysql用户=root ——mysql-host=localhost  \   祝辞,——mysql用户=root  mysql-host=localhost ——mysql-password=123456,——表=10,——table_size=100000,准备   sysbench  1.1.0  (using  bundled  LuaJIT  2.1.0-beta3)   致命:unable 用connect 用MySQL  server 提醒socket  & # 39;/数据/mysql/mysql.sock& # 39;,,流产……   致命:error  1049: Unknown  database  & # 39; sbtest& # 39;   致命:,“sysbench.cmdline.call_command& # 39;, function 失败:,。/oltp_common.lua: 88:, connection  creation 失败了   [root@dpcm01  lua] #, sysbench  oltp_read_write.lua ,——mysql-socket=/数据/mysql/mysql.sock ——mysql用户=root ——mysql-host=localhost ——mysql用户=root ——mysql-host=localhost ——mysql-password=123456,——表=10,——table_size=100000,准备   sysbench  1.1.0  (using  bundled  LuaJIT  2.1.0-beta3)   Creating  table  & # 39; sbtest1& # 39;…   Inserting  100000, records  into  & # 39; sbtest1& # 39;   Creating  a  secondary  index 提醒& # 39;sbtest1& # 39;…   Creating  table  & # 39; sbtest2& # 39;…   Inserting  100000, records  into  & # 39; sbtest2& # 39;   Creating  a  secondary  index 提醒& # 39;sbtest2& # 39;…   Creating  table  & # 39; sbtest3& # 39;…   Inserting  100000, records  into  & # 39; sbtest3& # 39;   Creating  a  secondary  index 提醒& # 39;sbtest3& # 39;…   Creating  table  & # 39; sbtest4& # 39;…   Inserting  100000, records  into  & # 39; sbtest4& # 39;   Creating  a  secondary  index 提醒& # 39;sbtest4& # 39;…   Creating  table  & # 39; sbtest5& # 39;…   Inserting  100000, records  into  & # 39; sbtest5& # 39;   Creating  a  secondary  index 提醒& # 39;sbtest5& # 39;…   Creating  table  & # 39; sbtest6& # 39;…   Inserting  100000, records  into  & # 39; sbtest6& # 39;   Creating  a  secondary  index 提醒& # 39;sbtest6& # 39;…   Creating  table  & # 39; sbtest7& # 39;…   Inserting  100000, records  into  & # 39; sbtest7& # 39;   Creating  a  secondary  index 提醒& # 39;sbtest7& # 39;…   Creating  table  & # 39; sbtest8& # 39;…   Inserting  100000, records  into  & # 39; sbtest8& # 39;   Creating  a  secondary  index 提醒& # 39;sbtest8& # 39;…   Creating  table  & # 39; sbtest9& # 39;…   Inserting  100000, records  into  & # 39; sbtest9& # 39;   Creating  a  secondary  index 提醒& # 39;sbtest9& # 39;…   Creating  table  & # 39; sbtest10& # 39;…   Inserting  100000, records  into  & # 39; sbtest10& # 39;   Creating  a  secondary  index 提醒& # 39;sbtest10& # 39;…   [root@dpcm01  lua] #, sysbench ——线程=4 \   在,,,,,,,,,,时间=20,\   在,,,,,,,,,,报告的时间间隔=5 \   在,,,,,,,,,mysql-host=localhost  \   在,,,,,,,,,,mysql-port=3306 \   在,,,,,,,,,mysql用户=root  \   在,,,,,,,,,,mysql-password=123456,——mysql-socket=/数据/mysql/mysql.sock  \   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null

如何安装使用sysbench