记录一次安装scribe的过程
第一步、安装依赖库(Dependencies)yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel bzip2-devel openssl-devel
mkdir /usr/local/src
cd /usr/local/src/
第二步、安装boost C++库
wget http://nchc.dl.sourceforge.net/project/boost/boost/1.45.0/boost_1_45_0.tar.bz2
tar -jxvf boost_1_45_0.tar.bz2
cd boost_1_45_0
./bootstrap.sh
./bjam -s HAVE_ICU=1 --prefix=/usr/local/boost --includedir=/usr/local/boost/include --libdir=/usr/local/boost/lib
./bjam install --prefix=/usr/local/boost
或者:到boost官网下载最新版本的boost,
解压后,运行
./bootstrap.sh
第三步、安装Facebook Thrift框架
下载最新版解压后
./bootstrap.sh
如果出现error: Autoconf version 2.65 or higher is required
则安装autoconf 2.65
如果出现-bash: make: command not found 是因为安装系统的时候使用的是最小化mini安装,系统没有安装make、vim等常用命令,直接yum安装下即可
可能需要yum -y install gcc automake autoconf libtool make
./configure
make
如果出现TNonblockingServer.cpp错误,则:
{
wget http://monkey.org/~provos/libevent-1.4.13-stable.tar.gz
tar -xvzf libevent-1.4.13-stable.tar.gz
cd libevent-1.4.13-stable
./configure && make
make install
}
make install
cd contrib/fb303/
./bootstrap.sh
./configure CPPFLAGS="-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H" --with-boost=/usr/local/boost
make
make install
第四步、安装Facebook Scribe Server
下载解压后:
./bootstrap.sh
./configure
遇到问题:
configure: error: Could not link against!
解决办法,在configure 后加一个参数 --with-boost-filesystem=boost_filesystem
make
make install
第五步、测试
cp examples/example1.conf /usr/local/scribe/conf
/usr/local/scribe/bin/scribed -c /usr/local/scribe/conf/example1.conf >> /tmp/scribed.log 2>&1 &
cd ./examples
echo "hello world" | ./scribe_cat test
more /tmp/scribetest/test/test_current
第六步、加到nagios监控
查看状态: ./scribe_ctrl status
监听 1463
https://github.com/joshdevins/scribe-monitor/blob/master/nagios/check_scribe
第七步、配置
https://github.com/facebook/scribe/wiki/Scribe-Configuration
比较合理的配置是:每个生产机启动 local scribe server,由一台集中机 central scribe server 接收local scribe server 发过来的消息
页:
[1]