Ubuntu compile and install Hypertable method

  

HyperTable is an open source database, the installation in Ubuntu system is not so simple, the following small series will be a detailed introduction of HyperTable under Ubuntu compile and install, if you still don't know If you install it, you can learn it.

[mounted]

installation process running on Ubuntu Caozuoxitong given below are instructions for installing Ubuntu embodiment, if the user wants to install other platforms environment, Refer to the following installation items and replace them with the installation instructions of the common platform. Next, explain the relevant file storage location during the compilation process, how to configure and compile the original code, and finally explain how to install and how to perform regression testing. .

The storage path of the Hypertable source code is placed in:

~/src/hypertable

The link object file generated during compilation is stored in:

~/build/hypertable

Compile completed output executable file storage path:

~/hypertable

[Download original code]

To get Hypertable source code needs to first install git this version of the version control software proposed by google, the installation instructions are as follows:

$ sudo apt-get install git-core

Then execute the following command to set git User information, this user information is in principle stored by git, the version control software, and a reference source for users who download the code. The user information is set as follows: :

$ git config --global user.name “"your name"”

$ git config --global user.email “"your email"”

Use git to download Hypertable source code instructions:

$ git clone Git://scm.hypertable.org/pub/repos/hypertable.git

Update the downloaded Hypertable source code:

$ cd ~/hypertable

$ Git pull

[How to set the compilation configuration]

Before compiling Hypertable, you need to prepare the compilation environment first. Some compilation software must be installed first. The following is listed in In the Ubuntu environment, the installation instructions for each compilation software:

This package is required to install the C language standard library. If the build-essential package is not installed, stdio may not be found during the compilation phase. .h This is the location where the file is imported, so it is recommended to confirm that the kit is installed.

$ sudo apt-get install build-essential

Some data compression and decompression functions are used in Hypertable, so you need to install z library.

$ sudo apt-get install zlib1g-dev

Install cross-platform makefiles generation tool CMake, so you can choose the compiler and build environment to generate Hypertable executable files; publish information according to the official website The currently tested executable platform is still dominated by Linux/Unix, and the Windows platform is still being tested.

$ sudo apt-get install cmake

Install the Boost library 1.34.1 or later. This library is designed to enhance the C++ Standard Library and contains functions like memory Buffer. Processing, math, hash, MPI, graphics, etc.

$ sudo apt-get install libboost.*-dev libboost-doc libboost.*1.34.1

Install the log4cpp suite, which is designed with reference to log4j, so the name is for c++ The designed logging file mechanism, the record file in the Hypertable is the log function of the set of recording mechanism.

$ sudo apt-get install liblog4cpp*

Install the expat suite, which is an XML processing library that is referenced in Hypertable for access to XML.

$ sudo apt-get install expat libexpat1 libexpat1-dev

Install the libattr suite, which is a library for handling extended attributes of files.

$ sudo apt-get install libattr1 libattr1-dev

Install the readline suite, which contains the command line library on the terminal and the login to the hql shell mode in Hypertable. , or other situations that would require reading the command line will use this type of functionality.

$ sudo apt-get install libreadline5-dev

Install ncurses, through which you can write the text mode interface under the terminal, in the Hypertable it is like logging in to hql shell mode, or need to simulate The user interface in text mode will use this type of functionality.

$ sudo apt-get install libncurses5 libncurses5-dev

Install the tcmalloc (Thread-Caching Malloc) suite, a memory configuration kit that handles memory in multi-threaded situations Recycling library.

$ sudo apt-get install libgoogle-perftools0 libgoogle-perftools-dev

Before you start compiling the program, you need to create an installation directory and the compiled object file directory

$ mkdir ~/src/hypertable

$ mkdir -p ~/build/hypertable

Execute CMake to generate the compiled configuration files (makefiles) and specify the compiled executable file mode as Detect The wrong mode (Debug) or release mode (Release), and the installation path, if the Boost library under the default path cannot be found during the configuration process, you can specify the path, for example, the following example, where - D represents the preamble that defines a variable.

$ cmake -DCMAKE_INSTALL_PREFIX=“~/hypertable” -DCMAKE_BUILD_TYPE=“Debug” -DBoost_INCLUDE_DIR=“/usr/include/boost” ~/src/hypertable

During the configuration file read by the program, the display results are described as follows:

Configuration process. . .

-- Looking for required boost libraries. .

Look for the boost library. . .

-- Boost include dir: /usr/include/boost

Find the header file path for boost

-- Boost thread lib: /usr/lib/libboost_thread- Mt.so

Find the dynamic library for multi-thread processing of boost

-- Boost program options lib: /usr/lib/libboost_program_options-mt.so

Boost lib dir dir: /usr/lib

Find the dynamic program inventory path for boost

-- Boost version: 1_34_1

Display the version information of boost

-- Looking for doxygen. .

Look for the doxygen library. . .

-- Looking for doxygen. . - found /usr/bin/doxygen

Find the executable path for doxygen

-- Looking for dot tool. .

Looking for the dot kit for graphviz drawing

-- Looking for dot tool. . - found /usr/bin/dot

Find the executable path for dot

-- Found Tcmalloc: /usr/lib/libtcmalloc_minimal.so

Find the dynamic link for tcmalloc Library path

-- Got boost 1.34.x, prepend fix directory

-- Configuring done

-- Generating done

-- Build files Have been written to: ~/build/hypertable

After the configuration is completed, put the configuration files required for compilation to the specified path ~/build/hypertable

[How to compile and install]

Before starting compilation, you must first switch to the storage path of the compiled configuration file. According to the above configuration, the default path is ~/build/hypertable, and then execute the compile command:

$ cd ~/Build/hypertable

$ make
Previous1234Next page Total 4 pages

Copyright © Windows knowledge All Rights Reserved