<!-- /* Font Definitions */ @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:黑体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimHei; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:1 135135232 16 0 262144 0;} @font-face {font-family:"/@宋体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"/@黑体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:1 135135232 16 0 262144 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:宋体; mso-font-kerning:1.0pt;} h2 {mso-style-next:正文; margin-top:13.0pt; margin-right:0cm; margin-bottom:13.0pt; margin-left:0cm; text-align:justify; text-justify:inter-ideograph; line-height:173%; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:2; font-size:16.0pt; font-family:Arial; mso-fareast-font-family:黑体; mso-bidi-font-family:"Times New Roman"; mso-font-kerning:1.0pt; font-weight:bold;} h3 {mso-style-next:正文; margin-top:13.0pt; margin-right:0cm; margin-bottom:13.0pt; margin-left:0cm; text-align:justify; text-justify:inter-ideograph; line-height:173%; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:3; font-size:16.0pt; font-family:"Times New Roman"; mso-font-kerning:1.0pt; font-weight:bold;} p.MsoFooter, li.MsoFooter, div.MsoFooter {margin:0cm; margin-bottom:.0001pt; mso-pagination:none; tab-stops:center 207.65pt right 415.3pt; layout-grid-mode:char; font-size:9.0pt; font-family:"Times New Roman"; mso-fareast-font-family:宋体; mso-font-kerning:1.0pt;} a:link, span.MsoHyperlink {mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; color:blue; mso-text-animation:none; text-decoration:none; text-underline:none; text-decoration:none; text-line-through:none;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline; text-underline:single;} p {mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; mso-pagination:widow-orphan; font-size:12.0pt; font-family:宋体; mso-bidi-font-family:宋体;} tt {mso-ansi-font-size:12.0pt; mso-bidi-font-size:12.0pt; font-family:宋体; mso-ascii-font-family:宋体; mso-fareast-font-family:宋体; mso-hansi-font-family:宋体; mso-bidi-font-family:宋体;} p.postmetadataalt, li.postmetadataalt, div.postmetadataalt {mso-style-name:"postmetadata alt"; mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; mso-pagination:widow-orphan; font-size:12.0pt; font-family:宋体; mso-bidi-font-family:宋体;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:595.3pt 841.9pt; margin:72.0pt 89.85pt 72.0pt 68.05pt; mso-header-margin:42.55pt; mso-footer-margin:49.6pt; mso-paper-source:0; layout-grid:15.6pt;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:1806656946; mso-list-template-ids:-1654743824;} @list l0:level1 {mso-level-number-format:bullet; mso-level-text:; mso-level-tab-stop:36.0pt; mso-level-number-position:left; text-indent:-18.0pt; mso-ansi-font-size:10.0pt; font-family:Symbol;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} -->
scribe 研究 - 一种分布式日志系统( facebook )
一张 scribe 结构图
先转一下,留作后用。
Installing Scribe For Log Collection
Scribe is a newly released log collection tool that dumps log files from various nodes in a cluster to Scribe servers, where the logs are stored for further use. Facebook describes their usage of Scribe by saying, “[Scribe] runs on thousands of machines and reliably delivers tens of billions of messages a day.” It turns out that Scribe is rather difficult to install, so the hope of this post is to help those of you attempting to install Scribe. The first step is to get dependencies installed.
Dependencies
Scribe has many dependencies that must be installed in order for Scribe to be built properly. They are listed here:
- ruby (ruby and ruby-dev)
- python (python and python-dev)
- libevent (libevent and libevent-dev)
- boost v1.36
- Thrift
- fb303 (included in Thrift in contrib/fb303)
The order in which these are installed is important. First, you must install libevent, then libevent-dev, then boost, then Thrift, and finally fb303. I installed libevent and libevent-dev from RPMs, whereas boost, Thrift, and fb303 were installed from source. I was unable to get Scribe, Thrift, and fb303 to locate the boost libraries and includes correctly with the default boost install directories, so I installed boost in /usr/local/boost, /usr/local/boost/bin, /usr/local/boost/lib, and /usr/local/boost/include. Run ‘./configure –help’ when configuring boost to see how to specify these options.
When configuring Thrift and fb303, you must specify your location of boost with the “–with-boost=/path/to/boost/root” option and also set your BOOST_ROOT environment variable.
Finally, you must make sure your LD_LIBRARY_PATH environment variable contains the lib folders that house the Thrift, fb303, boost, and libevent C++ libraries. LD_LIBRARY_PATH follows the same pattern as the PATH variable. That is, directories that contain libraries are separated by colons. If you forget to set your LD_LIBRARY_PATH variable, then you’ll get the following error when running scribed:
scribed: error while loading shared libraries: libboost_system-gcc41-mt-1_36.so.1.36.0: cannot open shared object file: No such file or directory
Install Scribe
Once you’ve successfully installed all dependencies, installing Scribe is easy. Scribe ships with a fairly comprehensive README file, but the instructions involving boost’s configuration are slightly incorrect. I needed to pass the “–with-boost=/usr/local/boost” options while configuring. However, the README file says to use “–with-boost /usr/local/boost”. Here is my full configure statement:
./configure –with-boost=/usr/local/boost –with-boost-system=boost_system-gcc41-mt-1_36 –with-boost-filesystem=boost_filesystem-gcc41-mt-1_36
We installed Scribe from trunk instead of releases/scribe-2.0.
Configure Scribe
Scribe ships with a few good examples in $SCRIBE_ROOT/examples; just take a look at the README in the examples directory, and you should be ready to rock. However, the README doesn’t document that the scribe_ctrl and scribe_cat programs are in the examples directory.
I hope this tutorial was helpful! Send us an email if you have any issues. We’ll make a follow-up post later talking about more in-depth Scribe configurations and benchmarking.
Tuesday, October 28th, 2008 at 9:13 pm by Alex Loddengaard, filed under data collection .
转自:
http://www.cloudera.com/blog/2008/10/28/installing-scribe-for-log-collection/
centos 5 安装
在开源 Thrift , Hive 和 Cassandra 之后,Facebook 于2008 年10 月29 日开源了其分布式日志收集框架Scribe ,而且一上来就是stable 的2.0 版本。Scribe 是一个用于分布式收集日志的Thrift 服务,Facebook 描述它” 运行于数以千计的节点之上,每天可靠的发送数以百亿的消息“ 。
Scribe 本身的代码量不大,但安装相当烦琐,本文的安装环境是CentOS 5 ,其他distribution 如Ubuntu 的安装类似。Scribe 安装的依赖项包括:
* ruby (ruby and ruby-dev)
* python (python and python-dev)
* libevent (libevent and libevent-dev)
* boost 1.36
* thrift
* fb303
首先是安装ruby, python 和libevent ,这些比较容易,
yum install ruby ruby-devel
yum install python python-devel
yum install libevent libevent-devel
然后是boost ,Scribe 要求1.36 版本,先去boost 官方(http://www.boost.org/users/download/) 上下一个安装包,如果没装g++ ,
yum install gcc-c++
假设boost 安装的目录为/usr/local/boost
tar xzvf boost_1_36_0.tar.gz
cd boost_1_36_0
./configure --prefix=/usr/local/boost
make install
boost 编译需要的时间比较长,安装完boost 就可以装Thrift 了,注意要先thrift 依赖automake,libtool 等
yum install automake byacc libtool flex bison
wget -O thrift.tgz "http://gitweb.thrift-rpc.org/?p=thrift.git;a=snapshot;h=HEAD;sf=tgz"
tar -xzf thrift.tgz
cd thrift
./configure --with-boost=/usr/local/boost
make
make install
然后安装fb303,facebook 的支持库, 源文件在thrift 目录下的contrib/fb303
./configure --with-boost=/usr/local/boost
make
make install
终于可以装Scribe 了
设置环境变量BOOST_ROOT 为boost 安装路径
export BOOST_ROOT=/usr/local/boost
设置环境变量LD_LIBRARY_PATH ,指定包含Thrift, fb303, boost, libevent 的路径
export LD_LIBRARY_PATH=/usr/local/boost/lib::/usr/lib:/usr/local/lib
安装
./configure --with-boost=/usr/local/boost
make
make install
安装后可以试一下scribe 自带的例子,在目录examples 下。
转自:
http://www.hadoopchina.com/index.php?option=com_content&task=view&id=67&Itemid=39