Distributed log system (Scribe) Compilation and Installation

Source: Internet
Author: User

The distributed log system (Scribe) is compiled, installed, and recently prepared to integrate logs from multiple systems. Therefore, to build a distributed log storage system, the first consideration is Scribe, however, it takes a lot of time to compile and install the SDK (Scribe documentation is indeed missing, compared to Flume). Environment: Ubuntu13.04 32bit component: scribe 2.x( Latest Version) thrift 0.9.0boost 1.54fb303 thrift comes with other dependent packages (such as libevent, automake, flex, and bison) that can be installed or updated based on configure results. 1. Install boost on the official website. The version must be later than 1.36 (1.54.0 is used by the author). compile it according to the method described in the document: $ tar -- bzip2-xf/home/vincent/Download/boost_000054_0.tar.bz2 $ cd/home/vincent/Download/boost_000054_0 $. /bootstrap. sh -- help $. /bootstrap. sh -- prefix = opt/boost_1.54 $. /b2 install now, the boost library compilation is complete, and no additional options are required during compilation. The include and lib folders are generated under the directory specified by the -- prefix parameter to store the header files and library files. 2, install thrift download thrift package, installation is a classic three stride: $ tar zxvf thrift-0.9.0.tar.gz $ cd thrift-0.9.0/$ sudo. /configure CPPFLAGS = "-DHAVE_INTTYPES_H-DHAVE_NETINET_IN_H" $ sudo make install the CPPFLAGS parameter when configure is enabled; otherwise, errors such as "uint_32 undefined" are generated during make. In addition, if the boost library cannot be found during configure, you must use the -- with-boost parameter to specify the boost library location. After thrift is installed, you can perform a simple test to check whether the installation is successful. 3. Install fb303 fb303 In the thrift installation package and directly make the installation: $ cd contrib/fb303 $ sudo. /bootstrap. sh -- with-boost =/opt/boost_1.54/lib/$ sudo make install here -- with-boost specifies the boost library location 4. install the scribe dependent component, compile scribe: $. /bootstrap. sh $ sudo. /configure -- with-boost =/opt/boost_1.54/lib/-- prefix =/opt/scribe $ sudo make install may cause related errors during compilation: 1) if configure encounters the following error: checking whether the Boost: System library is Available... Yes checking whether the Boost: Filesystem library is available... Yes configure: error: cocould not link against! The parameter -- with-boost-system = lboost_system -- with-boost-filesystem = lboost_filesystem must be added to configure as follows: sudo. /configure -- prefix =/opt/scribe -- with-boost =/usr/local/lib -- with-boost-system = boost_system -- with-boost-filesystem = boost_filesystem CPPFLAGS = "- DHAVE_INTTYPES_H-DHAVE_NETINET_IN_H-DBOOST_FILESYSTEM_VERSION = 3 "2) if you encounter: undefined reference to 'boost: system: generic_category () 'und Efined reference to 'boost: system: system_category () 'Check the GCC link code (output according to make) after confirming that the boost: system is in stock and the path is correct ), the author's example is as follows: g ++-Wall-O3-L/usr/local/lib/-lboost_system-lboost_filesystem-o scribed store. o store_queue.o conf. o file. o conn_pool.o scribe_server.o zookeeper env_default.o-L/usr/local/lib-lfb303-lthrift-lthritnb-levent-L Pthread libscribe. a libdynamicbucketupdater. a needs to put the-lboost_system-lboost_filesystem options at the end, and manually execute the link in the src directory to complete the compilation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.