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 documents are indeed a little less than Flume). environment: ubuntu13.04... 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.
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.