scribe 介紹:
scribe 是facebook 開源的分佈式日誌系統 。 可以用java 藉助log4j 向分佈式scribe 寫入日誌。
安裝環境: centos5.2
所需軟件:
安裝過程:
一、輸入gcc –v 檢查gcc版本是否>3.3.5
是,則繼續下一步。否,則安裝gcc 。
二、安裝ruby 和python
python 用默認安裝路徑。Ruby 推薦使用默認路徑
安裝過程均爲./configure make make install
三、安裝lievent
解壓安裝即可
安裝過程爲./configure make make install
四、安裝 boost
解壓安裝即可(不可改路徑)
http://hi.baidu.com/maydaygmail/blog/item/9e38993bf4a176dc7c1e716c.html
五、安裝 php 和libxml2
先安裝libxml2 (php依賴它) 在安裝php(默認安裝路徑)
安裝過程均爲./configure make make install
六、安裝facebook 服務-- thrift 和 fb303
首先解壓並進入thrift 目錄
./bootstrap.sh
./configure –with-boost=/usr/local/include/boost/ -- with-php-config=/phppath /bin/php-config
make
make install
thrift 安裝完畢。
在當前目錄 cd 到contrib/fb303/ :
./bootstrap.sh
./configure –with-boost=/usr/local/include/boost/
make
make install
fb303安裝完畢。
七、安裝scribe
./bootstrap
./configure –with-boost=/usr/local/include/boost/
make
make install
安裝完畢。
配置環境變量 :
BOOST_ROOT=/usr/local/include/boost/
LD_LIBRARY_PATH=/usr/local/include/boost/lib::/usr/lob:/usr/local/lib
測試:
/usr/local/bin/scribed [scribe 解壓目錄]/examples/example1.conf
回車會出現:
[Sun Oct 31 23:37:38 2010] "STATUS: STARTING"
[Sun Oct 31 23:37:38 2010] "STATUS: configuring"
[Sun Oct 31 23:37:38 2010] "got configuration data from file </home/setups/scribe/scribe/examples/example1.conf>"
[Sun Oct 31 23:37:38 2010] "CATEGORY : default"
[Sun Oct 31 23:37:38 2010] "Creating default store"
[Sun Oct 31 23:37:38 2010] "configured <1> stores"
[Sun Oct 31 23:37:38 2010] "STATUS: "
[Sun Oct 31 23:37:38 2010] "STATUS: ALIVE"
[Sun Oct 31 23:37:38 2010] "Starting scribe server on port 1463"
Thrift: Sun Oct 31 23:37:38 2010 libevent 2.0.7-rc method epoll
okay scribe 服務已啓動。 (這個不只是測試,也是啓動scribe 服務的方式。)
補充:
關於scribe 的安裝 在下載目錄下有個有個readme 寫的很詳細(可能沒我寫的實用^^)
scribe的啓動和集羣測試,均在examples 目錄下的redme 上 寫得相當詳細。
如果大家在集羣上有疑問,可交流^^