Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 1.43 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2. # This is the process for installing Thrift, Scribed and the php extension on Ubuntu
  3. # lachlan@99designs.com
  4.  
  5. # install dependancies
  6. sudo apt-get install -y  libboost1.42-all-dev libevent-dev build-essential flex bison libtool libevent-dev php5-dev pkg-config
  7.  
  8. alias make="make -j 4"
  9.  
  10. # install thrift from source
  11. #https://github.com/cookbooks/thrift
  12.  
  13. rm -rf /usr/local/bin/*
  14. rm -rf /usr/local/lib/*
  15. rm -rf /usr/local/src/*
  16.  
  17. cd /usr/local/src
  18. #-- NOT WORK FOR ME
  19. #test ! -d thrift && git clone git://git.apache.org/thrift.git 
  20. svn co http://svn.apache.org/repos/asf/thrift/tags/thrift-0.5.0/
  21. cd thrift-0.5.0
  22. #cd thrift
  23. ./bootstrap.sh
  24. ./configure --without-ruby --without-csharp --without-java --without-erlang --without-perl
  25. make
  26. sudo make install
  27.  
  28. # install fb303
  29. cd contrib/fb303/
  30. ./bootstrap.sh
  31. make
  32. sudo make install
  33.  
  34. # install scribe
  35. cd /usr/local/src
  36. #test ! -d scribe && git clone git://github.com/facebook/scribe.git
  37. test ! -d scribe && git clone https://github.com/duedal/scribe.git
  38. cd scribe
  39. ./bootstrap.sh
  40.  
  41. CPPFLAGS="-DBOOST_FILESYSTEM_VERSION=2"
  42. make
  43. sudo make install
  44. sudo ldconfig
  45.  
  46. # install the php thrift extension
  47. cd /usr/local/src/thrift/lib/php/src/ext/thrift_protocol
  48. phpize
  49. ./configure --enable-thrift_protocol
  50. make
  51. make install
  52. echo "extension=thrift_protocol.so" > /etc/php5/conf.d/thrift_protocol.ini
  53.  
  54. # configure scribe
  55. mkdir -p /usr/local/scribe
  56. cp /usr/local/src/scribe/examples/example1.conf /usr/local/scribe/scribe.conf