Skip to content

Instantly share code, notes, and snippets.

@carlessistare
Created June 11, 2013 14:46
Show Gist options
  • Save carlessistare/5757458 to your computer and use it in GitHub Desktop.
Save carlessistare/5757458 to your computer and use it in GitHub Desktop.
Install Scribe Server
http://snippets.notmyidea.org/2009/07/30/using-scribe-log-server-with-php/
sudo apt-get install libboost-dev flex bison libtool automake autoconf pkg-config libevent-dev autoconf libtool php5 php-config g++ libcrypto++-dev libssl-dev libboost1.42-all-dev
svn co http://svn.apache.org/repos/asf/thrift/trunk thrift
cd thrift/
Problems with uint32_t
vim ./lib/cpp/src/Thrift.h
#include <wchar.h>
#include <stdint.h>
#include <arpa/inet.h>
./configure
make
sudo make install
cd contrib/fb303/
./bootstrap.sh
make
sudo make install
wget "https://github.com/downloads/facebook/scribe/scribe-2.2.tar.gz"
tar -xvzf scribe-2.2.tar.gz
cd scribe
./bootstrap.sh
make
sudo make install
vim /usr/local/scribe/scribe.conf
port=1463
max_msg_per_second=2000000
check_interval=3
# DEFAULT
<store>
category=default
type=buffer
target_write_size=20480
max_write_interval=1
buffer_send_rate=2
retry_interval=30
retry_interval_range=10
<primary>
type=file
fs_type=std
file_path=/tmp/scribetest
base_filename=thisisoverwritten
max_size=1000000
add_newlines=1
</primary>
<secondary>
type=file
fs_type=std
file_path=/tmp
base_filename=thisisoverwritten
max_size=3000000
</secondary>
</store>
mkdir testphp
cd testphp
/usr/local/bin/thrift -o . -I /usr/local/share/ --gen php /usr/local/share/fb303/if/fb303.thrift
/usr/local/bin/thrift -o . -I /usr/local/share/ --gen php /home/carles/scribe/if/scribe.thrift
cp /home/carles/thrift/lib/php/src/ includes -r
mkdir -p includes/packages/fb303
mkdir -p includes/packages/scribe
mv gen-php/fb303/FacebookService.php gen-php/fb303/fb303_types.php includes/packages/fb303/
mv gen-php/scribe/scribe_types.php includes/packages/scribe/
mv gen-php/scribe/scribe.php includes/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment