美文网首页
sysbench安装

sysbench安装

作者: _Irving | 来源:发表于2023-02-07 14:33 被阅读0次

sysbench是一个多线程的基准测试工具,一般用来评估不同系统参数下的数据库负载情况
如果你的环境上如下依赖包都没装上,需要先安装如下这些依赖包,使用yum install更便利

image.png
如果使用源码安装(在网上都可以找到源码资源)需要注意:
  • pkg-config编译时
[wanchao@localhost ~]$./configure --with-internal-glib
//直接./configure时可能会报onfigure: error: Either a previously installed pkg-config or "glib-2.0 >= 2.16" could not be found. Please set GLIB_CF
/原因是minGW默认没有安装glib,那么在下载的pkg-config-0.29.2.tar.gz中就存在glib包,使用压缩包自带的glib
[wanchao@localhost ~]$make
[wanchao@localhost ~]$make install
  • 其它的包解压后直接编译安装即可
[wanchao@localhost ~]$ tar -zxvf   xxx.tar.gz
[wanchao@localhost ~]$./configure && make  && make install
安装sysbench,解压都一致,编译时注意:
先执行
[wanchao@localhost ~]$ ./autogen.sh
  • 基准安装方式
- 基本安装--此安装仅用于测试资源基准测试,如cpu、memory
--without-mysql:排除mysql,因为如果要安装mysql话需要现有mysql驱动
[wanchao@localhost ~]$ ./configure --without-mysql
[wanchao@localhost ~]$ make && make install
  • 基于Mysql压测的安装方式
 mysql安装--此安装用于基准测试+Mysql压测。 
 --with-pgsql :声明基于mysql的安装,需要提前安装好mysql程序,并记录安装位置,下面参数使用
--with-mysql-includes:包含mysql的includes
 --with-mysql-libs:包含mysql的libs
注意--with-mysql-includes、--with-mysql-libs值的路径为当前实际mysql安装程序的路径
[wanchao@localhost ~]$./configure --with-pgsql --with-mysql-includes=/usr/local/mysql/include/ --with-mysql-libs=/usr/local/mysql/lib/
  • 基于Postgresql压测的安装方式
pgsql安装--此安装用于基准测试+pgsql压测。 
--without-mysql:排除mysql的安装
--with-pgsql:声明基于pgsql的安装 需要提前安装pgsql,并记录安装位置,下面参数使用
--with-pgsql-includes:包含pgsql的includes
--with-pgsql-libs:包含pasql的libs
注意--with-mysql-includes、--with-mysql-libs值的路径为当前实际postgresql安装程序的路径
[wanchao@localhost ~]$./configure --without-mysql --with-pgsql --with-pgsql-includes=/usr/local/postgresql/include --with-pgsql-libs=/usr/local/postgresql/lib

相关文章

网友评论

      本文标题:sysbench安装

      本文链接:https://www.haomeiwen.com/subject/uwzxkdtx.html