你的位置:首页 > 操作系统

[操作系统]scribe日志分析工具安装


系统CentOS6.2 x86_64

1.yum安装gcc,flex,m4,python/python-devel,ruby,libevent/libevent-devel,openssl/openssl-devel,bzip2/bzip2-devel,zlib/zlib-devel,bison,autoconf,automake,libtool

2.编译安装boost

2.1 wget http://nchc.dl.sourceforge.net/project/boost/boost/1.45.0/boost_1_45_0.tar.gz2.2 tar zxvf boost_1_45_0.tar.gz -C /usr/local/2.3 ./bootstrap.sh2.4 ./bjam -s HAVE_ICU=1 --prefix=/usr/local/boost --includedir=/usr/local/boost/include --libdir=/usr/local/boost/lib2.5 ./bjam install --prefix=/usr/local/boostecho "/usr/local/boost/lib" >> /etc/ld.so.confecho "/usr/local/boost/include" >> /etc/ld.so.confldconfig

 

3.编译安装thrift+fb303

安装thrift
3.1 wget http://archive.apache.org/dist/thrift/0.7.0/thrift-0.7.0.tar.gz3.2 tar zxvf thrift-0.7.0.tar.gz -C/usr/local/3.3 cd /usr/local/thrift-0.7.03.4 chmod +x configure3.5 ./configure--with-boost=/usr/local/boost3.6 make && make install
echo "/usr/local/thrift/lib" >> /etc/ld.so.conf
ldconfig安装fb303
3.7 cd /usr/local/thrift-0.7.0/contrib/fb3033.8 chmod +x bootstrap.sh3.9 ./bootstrap.sh --with-boost=/usr/local/boost/3.10 ./configure --prefix=/usr/local/thrift/fb303 --with-boost=/usr/local/boost --with-thriftpath=/usr/local/thrift3.11 make && ake install

 

4.编译安装scribe

4.1 去https://github.com/facebook/scribe下载scribe4.2 解压 unzip scribe-master.zip4.3 cd scribe-masterexport BOOST_ROOT=/usr/local/boostexport LD_LIBRARY_PATH=/usr/local/thrift/lib:/usr/lib:/usr/local/lib:/usr/local/boost/lib:/usr/local/thrift/fb303/lib./bootstrap.sh --with-boost=/usr/local/boost --with-boost-filesystem=boost_filesystem4.4 ./configure --prefix=/usr/local/scribe --with-boost=/usr/local/boost --with-thriftpath=/usr/local/thrift --with-fb303path=/usr/local/thrift/fb303 --with-boost-filesystem=boost_filesystem4.5 make && make install

 

5. 测试

cp example/example1.conf /tmp/usr/local/scribe/bin/scribed /tmp/example1.conf进行测试

 

参考:

http://www.cnblogs.com/hadoopdev/p/3207940.html

http://ixdba.blog.51cto.com/2895551/1368792