源码编译安装Infobright(Bright House)


操作系统:Centos5.6

Infobright版本:Infobright Community Edition(ICE)4.0.5

下面的安装过程和Infobright源码中的README文件中给出的步骤基本相同,变化的地方很少。Infobright配置过程也很类似与MySQL Community的配置过程的。README文件的内容见下篇博客,Infobright Installation Using a Source Distribution(Infobright README)http://blog.csdn.net/geekcoder/article/details/12571237

1、配置编译连接工具
# yum install gcc* make autoconf libtools* -y

Infobright源码编译安装和启动mysqld-ib的时候需要使用到boost库, boost库版本要求在v1.42.0上。
编译安装boost库
boost-1.43.0下载页面,http://sourceforge.net/projects/boost/files/boost/1.43.0/
或者个人360网盘下载地址:http://yunpan.cn/QbqmFR9IQiLI3

# ./bootstrap.sh --prefix=/usr/local/boost_1_43_0
# ./bjam install
执行bootstrap.sh过程中会提示安装一些依赖包,按照提示yum安装这些依赖的包。

在环境变量中,配置boost库动态连接路径
# vim /etc/profile
添加 export LD_LIBRARY_PATH=/usr/local/boost_1_43_0/lib:$LD_LIBRARY_PATH

# source /etc/profile

# ldconfig 或者 #/sbin/ldconfig -v
这一步很重要,否则下面的Infobright的安装过程中和启动mysqld-ib会提示找不到很多共享库文件(.so文件)。

2、编译安装Infobright
个人360网盘下载地址:http://yunpan.cn/Qbqm8DsTyhyyU

# tar zxvf infobright-4.0.7-0-src-ice.tar.gz
# cd infobright-4.0.7
# make -j 8 PREFIX=/usr/local/infobright   EDITION=community release
# make -j 8 PREFIX=/usr/local/infobright   EDITION=community install-release
make -j 8 表示使用服务器的8个核并行编译
PREFIX=/usr/local/infobright 指定安装路径
3、添加mysql用户
# useradd mysql
禁止使用mysql账户系统登录,
# vim /etc/passwd
mysql:x:500:500::/home/mysql:/bin/bash 更改为
mysql:x:500:500::/home/mysql:/sbin/nologin
4、mysql数据库初始化
# cp src/build/pkgmt/my-ib.cnf /usr/local/infobright/conf/my-ib.cnf
可以修改my-ib.cnf配置文件,如basedir、datadir、log等参数选项
basedir   = /usr/local/infobright
datadir   = /usr/local/infobright/data
log-error = /usr/local/infobright/data/bh.err
# cd /usr/local/infobright
# ./bin/mysql_install_db --basedir=/usr/local/infobright --datadir=/usr/local/infobright/data --user=mysql
如果这一步提示错误,表示--basedir和--datadir参数设置存在问题
 
# chown -R root  .
# chgrp -R mysql .
# chown -R mysql data/ cache/
5、配置启动脚本
# cp share/mysql/mysql.server /etc/init.d/mysqld-ib
# vim /etc/init.d/mysqld-ib
设置默认配置文件和进程用户
conf=@BH_CONF@
user=@BH_USER@
修改为:
Shell代码
conf=/etc/mysql-ib.cnf
user=mysql

加入开机启动:
# vim  /etc/rc.local
添加 /etc/init.d/mysqld-ib start
增加mysql client软链接
# ln -s ./bin/mysql /usr/local/mysql-ib

6、启动
/etc/init.d/mysqld-ib start
如果启动失败,查看log_error指定的错误日志文件

7、安装过程中出现的错误
1)没有设置boost动态连接库路径引
错误提示:
/usr/local/infobright/libexec/mysqld: error while loading shared libraries: libboost_filesystem.so.1.43.0: cannot open shared object file
启动时没有找到boost动态连接库,设置LD_LIBRARY_PATH,以便程序加载运行时能够自动找到需要的动态链接库。
解决方案:
在/etc/profile中添加
export LD_LIBRARY_PATH=/usr/local/boost_1_43_0/lib:$LD_LIBRARY_PATH
或者在/etc/init.d/mysqld-ib中添加export LD_LIBRARY_PATH=/usr/local/boost_1_43_0/lib:$LD_LIBRARY_PATH

2)data、cache等目录没有设置mysql访问权限
错误提示:
/usr/local/infobright/libexec/mysqld: Table 'mysql.plugin' doesn't exist
131009 10:55:34 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
131009 10:55:34 [ERROR] Unable to load configuration
131009 10:55:34 [ERROR] ERROR: The configuration file brighthouse.ini not found
131009 10:55:34 [ERROR] Plugin 'BRIGHTHOUSE' init function returned error.
131009 10:55:34 [ERROR] Plugin 'BRIGHTHOUSE' registration as a STORAGE ENGINE failed.
131009 10:55:34 [ERROR] Failed to initialize plugins.
131009 10:55:34 [ERROR] Aborting

解决方案:
# cd /usr/local/infobright
# chown -R root  .
# chgrp -R mysql .
# chown -R mysql data cache

参考

1、http://www.stamhe.com/?p=1028

2、http://www.mysqlsky.com/201110/infobright-setup-install-upgrade

3、http://blog.csdn.net/geekcoder/article/details/12571237

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值