有人知道在 EC2 实例上安装 Facebook 的 Scribe 的详细步骤吗?

发布于 2024-11-17 07:56:12 字数 76 浏览 6 评论 0原文

有人知道在 EC2 实例上安装 Facebook 的 Scribe 的详细步骤吗?

通过搜索找到的大多数说明都有点过时了。

Anyone have details steps for installing Facebook's Scribe on an EC2 Instance?

Most of the instructions found by doing a search are a bit out of date.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

把时间冻结 2024-11-24 07:56:12

我也在 Amazon Linux AMI 上使用了此处的配方就像过去 6 个月的 Fedora 镜像一样。只要有这个食谱,确实需要付出那么多努力。令我震惊的是,有多少公司已经建立了自己的抄写器 RPM,但实际上却没有好的 RPM。

I've used the recipe here on both the Amazon Linux AMI as well as on a Fedora image in the past 6 months. As long as that recipe is, it really does require that much effort. It still shocks me how many companies have built their own scribe RPM's and yet no good ones exist in the wild.

许你一世情深 2024-11-24 07:56:12

我找到了这些较旧的安装说明并将其用作起点:

http://www.design-ireland.net/?http%3A//www.design-ireland.net/article/Installing_Facebook_Scribe_on_Fedora_8
http://boost.2283326.n4.nabble.com/1-42-0-Release-candidates-available-td2626376.html

安装

# download scribe code (I opted for /local)
cd /local
git clone https://github.com/facebook/scribe.git scribe

# install libevent
yum install libevent
yum install libevent-devel

# install boost - the version installed by 'yum boost' didn't seem to be work with scribe
# had to build my own from one revision back, v1.45, as there was a bug with current version
mkdir boost
cd boost
wget http://sourceforge.net/projects/boost/files/boost/1.45.0/boost_1_45_0.tar.gz
tar zxvf boost_1_45_0.tar.gz
boostrap.sh
./bjam -sNO_COMPRESSION=1

# Install thrift and apply patch (see below)
mkdir thrift
cd thrift
yum install python-devel
wget http://mirror.olnevhost.net/pub/apache//thrift/0.6.1/thrift-0.6.1.tar.gz
tar -zxvf thrift-0.6.1.tar.gz
cd thrift-0.6.1
# Thrift patch applied: https://issues.apache.org/jira/browse/THRIFT-1060
make
make install

# Install fb303
cd contrib/fb303
./bootstrap
./configure
make 
make install

# scribe
cd /local/scribe
export LD_LIBRARY_PATH="/usr/local/lib"
/sbin/ldconfig
./bootstrap.sh
./configure
make

测试

修改抄写员/示例/example1.conf 以适合您的环境

创建以下短期运行脚本

export LD_LIBRARY_PATH="/usr/local/lib"
scribed -c ./modified_example.conf

必须通过将我的 MAC 范围添加到 EC2 盒子上打开 Thrift 端口 1463安全组的入站 TCP 端口

我使用 scribe 和 thrift_client gem 编写了一个简单的 ruby​​ 测试应用程序

require 'scribe'

client = Scribe.new("xxx-xxx-xx-xxx-xxx.compute-1.amazonaws.com:1463", "default" ,false, {:connect_timeout => 3, :retries => 3})

(0..100).each do |x|
  n = Time.now
  begin
    client.log("#{n} #{"%10.6f" % n.to_f} - testing loop #{x}", "bucket-#{x % 10}")
  rescue Exception => e
    puts e.message
    puts e.backtrace.inspect
  end
  sleep 0.01
end

I found these older install instructions and used them as starting points:

http://www.design-ireland.net/?http%3A//www.design-ireland.net/article/Installing_Facebook_Scribe_on_Fedora_8
http://boost.2283326.n4.nabble.com/1-42-0-Release-candidates-available-td2626376.html

Installing

# download scribe code (I opted for /local)
cd /local
git clone https://github.com/facebook/scribe.git scribe

# install libevent
yum install libevent
yum install libevent-devel

# install boost - the version installed by 'yum boost' didn't seem to be work with scribe
# had to build my own from one revision back, v1.45, as there was a bug with current version
mkdir boost
cd boost
wget http://sourceforge.net/projects/boost/files/boost/1.45.0/boost_1_45_0.tar.gz
tar zxvf boost_1_45_0.tar.gz
boostrap.sh
./bjam -sNO_COMPRESSION=1

# Install thrift and apply patch (see below)
mkdir thrift
cd thrift
yum install python-devel
wget http://mirror.olnevhost.net/pub/apache//thrift/0.6.1/thrift-0.6.1.tar.gz
tar -zxvf thrift-0.6.1.tar.gz
cd thrift-0.6.1
# Thrift patch applied: https://issues.apache.org/jira/browse/THRIFT-1060
make
make install

# Install fb303
cd contrib/fb303
./bootstrap
./configure
make 
make install

# scribe
cd /local/scribe
export LD_LIBRARY_PATH="/usr/local/lib"
/sbin/ldconfig
./bootstrap.sh
./configure
make

Testing

Modify the scribe/example/example1.conf to fit your environment

Create the following short run script

export LD_LIBRARY_PATH="/usr/local/lib"
scribed -c ./modified_example.conf

Had to open the Thrift port, 1463, on the EC2 box by adding my MAC range to the Security Group's Inbound TCP ports

I wrote a simple ruby test app using scribe and thrift_client gem

require 'scribe'

client = Scribe.new("xxx-xxx-xx-xxx-xxx.compute-1.amazonaws.com:1463", "default" ,false, {:connect_timeout => 3, :retries => 3})

(0..100).each do |x|
  n = Time.now
  begin
    client.log("#{n} #{"%10.6f" % n.to_f} - testing loop #{x}", "bucket-#{x % 10}")
  rescue Exception => e
    puts e.message
    puts e.backtrace.inspect
  end
  sleep 0.01
end
隐诗 2024-11-24 07:56:12

我一直在使用这个 gist bash 脚本来安装 EC2 上的 scribe 和依赖项ubuntu盒子。

I have been using this gist bash script to install scribe and dependancies on EC2 ubuntu boxes.

情归归情 2024-11-24 07:56:12

我没有足够的代表来发表评论,我想回复 @Steve Wilhelm 提出的说明 - 请注意此步骤:
./bjam -sNO_COMPRESSION=1
我花了很长时间(现在一个多小时了)——因为我试图在 EC2 t1.micro 实例上运行它。 (这是一个低功耗实例,但仍然)我事先并不知道这一点,如果我知道的话,我会使用 nice -n 3 运行它,这样它不会使另一个盒子变慢也正在尝试使用它的开发人员。

编辑:它完成了一个多小时,完成后最终占用了 500MB 的空间。

I don't have enough rep to comment, I wanted to reply to the instructions laid out by @Steve Wilhelm -- please note that this step:
./bjam -sNO_COMPRESSION=1
Is taking a long time for me (a bit over an hour now) -- as I'm trying to run this on an EC2 t1.micro instance. (it's a low-powered instance, but still) I did not know this beforehand, if I did I would have run this with a nice -n 3 so it doesn't make the box slow for another developer who's trying to use it also.

edit: It finished a bit over an hour, and ended up taking a bit over 500mb space when finished.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文