scribed 安装

最近做日志分流,早闻scribed大名,正好安装尝试一下.据说源码很简单,安装很麻烦.

公司yum源里其实有打好包的scribe,可惜是centos5的,苦逼的未升级的历史遗留centos4只能蛋疼的从源码安装.

刚开始借鉴的这篇:

http://dongxicheng.org/search-engine/scribe-installation/

后来发现这篇更简洁:

http://agiletesting.blogspot.com/2009/10/compiling-installing-and-test-running.html

步骤都差不多,先装boost(已有),再装thrift,然后fb303.在之中检查各种依赖的库和软件.

我自己的话,是升级了libevent和automake.

主要说说安装中遇到得问题:

1. thrift对boost的依赖问题: 即使使用正确的--with-boost也始终报版本不匹配.:

改configure文件,把BOOST_CPPFLAGS="-I$ac_boost_path/include" 改为 BOOST_CPPFLAGS="-I$ac_boost_path/"

通过.

2. htons,htonl报parameter不匹配等. 加configure参数(这个在编译scribe的时候也要加上):

CPPFLAGS="-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H"

3. std:tr1:functional找不到:

find . -name *.h -o -name *.cpp | xargs -i grep -H "tr1/func" {}

文件不多,其实是sed不熟,手动修改了.

4. fb303遇到问题与thrift类似.

4. scribe遇到问题与thrift类似.

5. 编译scribe遇到, configure: error: Could not link against  !的问题: 没有链接上boost的库.

编译boost的共享动态库(.so)于系统库目录.

6. 用example下的scribed_cat做测试程序(scribed_pipe版本过老):

cat apache_access_log | python scribed_cat apache.access

由于项目中木有用hadoop,没有试验与hdfs的集成.

猜你喜欢

转载自calmhawk.iteye.com/blog/1517303