爱你不容易-sysbench

用源码方式安装。

下载:在github搜索sysbench,https://github.com/,点击“Clone or download”,选择“Download ZIP”。

根据github网页文档准备环境:【测试环境-sxyd-10.231.19.172】
Building and Installing From Source --- Build Requirements --- RHEL/CentOS
yum -y install make automake libtool pkgconfig libaio-devel
# For MySQL support, replace with mysql-devel on RHEL/CentOS 5
yum -y install mariadb-devel
# For PostgreSQL support
yum -y install postgresql-devel

Build and Install:
./autogen.sh
./configure --prefix=/usr/local/sysbench/ --with-oracle="/home/oracle/instantclient/instantclient_11_2" --includedir=/home/oracle/instantclient/instantclient_11_2/sdk/include
make

■0.5卡在这里
../libtool: line 4978: cd: yes/lib: No such file or directory

■sysbench-master和1.0均卡在
编译时不兼容的变量类型及转换等,可能需要最新版本的系统和安装包吧,或者干脆使用binarypackage安装使用吧

■找不到相关的库,ldocnfig加上库目录
/usr/bin/ld: warning: libnnz11.so, needed by /home/oracle/instantclient/instantclient_11_2/libclntsh.so, not found (try using -rpath or -rpath-link)
echo "/home/oracle/instantclient/instantclient_11_2/" > /etc/ld.so.conf.d/oracle.conf
ldconfig

■drv_oracle.c:30:17: error: oci.h: No such file or directory
configure时加上--includedir即可

结论:sysbench想说爱你不容易!
但是默认的with-mysql支持mysql数据库,没有问题。
./configure --prefix=/usr/local/sysbench/
./configure --prefix=/usr/local/sysbench-master/
由于mysql安装在默认的系统目录,无需指定inc和lib路径。--with-mysql-includes= --with-mysql-libs=

最后使用如下步骤可以编译成功0.5版本,看来1.0版本、master最新版都不成。

Build and Install:【0.5版本的build操作命令格式如下】

 

标签:

发表评论

电子邮件地址不会被公开。 必填项已用*标注