Compilation

RocksDB's library should be able to compile without any dependency installed, although we recommend installing some compression libraries (see below). We do depend on newer gcc/clang with C++11 support.

There are few options when compiling RocksDB:

  • [recommended] make static_lib will compile librocksdb.a, RocksDB static library.

  • make shared_lib will compile librocksdb.so, RocksDB shared library.

  • make check will compile and run all the unit tests

  • make all will compile our static library, and all our tools and unit tests. Our tools depend on gflags. You will need to have gflags installed to run make all.

  • By default the binary we produce is optimized for the platform you're compiling on (-march=native). If you want to build a portable binary, add 'PORTABLE=1' before your make commands, like this: PORTABLE=1 make static_lib

Dependencies

  • You can link RocksDB with following compression libraries:

    • zlib - a library for data compression.
    • bzip2 - a library for data compression.
    • snappy - a library for fast data compression.
  • All our tools depend on:

    • gflags - a library that handles command line flags processing. You can compile rocksdb library even if you don't have gflags installed.

Supported platforms

  • Linux - Ubuntu

    • Upgrade your gcc to version at least 4.7 to get C++11 support.
    • Install gflags. First, try: sudo apt-get install libgflags-dev If this doesn't work and you're using Ubuntu, here's a nice tutorial: (http://askubuntu.com/questions/312173/installing-gflags-12-04)
    • Install snappy. This is usually as easy as: sudo apt-get install libsnappy-dev.
    • Install zlib. Try: sudo apt-get install zlib1g-dev.
    • Install bzip2: sudo apt-get install libbz2-dev.
  • Linux - CentOS

    • Upgrade your gcc to version at least 4.7 to get C++11 support: yum install gcc47-c++
    • Install gflags:

      1. wget https://gflags.googlecode.com/files/gflags-2.0-no-svn-files.tar.gz
      2. tar -xzvf gflags-2.0-no-svn-files.tar.gz
      3. cd gflags-2.0
      4. ./configure && make && sudo make install
    • Install snappy:

      1. wget https://snappy.googlecode.com/files/snappy-1.1.1.tar.gz
      2. tar -xzvf snappy-1.1.1.tar.gz
      3. cd snappy-1.1.1
      4. ./configure && make && sudo make install
    • Install zlib:

      1. sudo yum install zlib
      2. sudo yum install zlib-devel
    • Install bzip2:

      1. sudo yum install bzip2
      2. sudo yum install bzip2-devel
  • OS X:

    • Install latest C++ compiler that supports C++ 11:

      • Update XCode: run xcode-select --install (or install it from XCode App's settting).
      • Install via homebrew.
        • If you're first time developer in MacOS, you still need to run: xcode-select --install in your command line.
        • run brew tap homebrew/dupes; brew install gcc47 --use-llvm to install gcc 4.7 (or higher).
    • run brew install rocksdb
  • iOS:

    • Run: TARGET_OS=IOS make static_lib. When building the project which uses rocksdb iOS library, make sure to define two important pre-processing macros: ROCKSDB_LITE and IOS_CROSS_COMPILE.

rocksdb 编译安装 日志的更多相关文章

  1. Nginx服务编译安装、日志功能、状态模块及访问认证模式实操

    系统环境 [root@web ~]# cat /etc/redhat-release CentOS release 6.9 (Final) [root@web ~]# uname -a Linux d ...

  2. linux下rocksdb的编译安装

    RocksDB起源于Facebook的实验室项目,实现了一个高性能的快速存储器,是基于C++编写的key value数据库,很多软件都是采用内置rocksdb的方式运行,所以需要我们提前安装rocks ...

  3. 编译安装zabbix3.2

    1.1 环境准备 系统环境准备:redhat 6.6 64位mysql-5.6.34php-5.6.28zabbix-3.2.1配置前先关闭iptables和SELINUX,避免安装过程中报错. # ...

  4. ubuntu10.04编译安装LAMP

    ubuntu10.04编译安装LAMP以及简单wordpress的使用 : http://linuxme.blog.51cto.com/1850814/971631 一.源码安装LAMP 网上有一堆关 ...

  5. CentOS 7.1编译安装PHP7

    原文: https://typecodes.com/web/centos7compilephp7.html?utm_source=tuicool&utm_medium=referral 1 创 ...

  6. Linux下编译安装MariaDB

    MariaDB是MySQL的一个开源分支,主要是社区在维护,并且完全兼容MySQL,并且可以很方便的称为MySQL的替代,MariaDB的诞生正是出自MySQL创始人Michael Widenius之 ...

  7. CentOS7 编译安装 nginx-1.10.0

    对于NGINX 支持epoll模型 epoll模型的优点 定义: epoll是Linux内核为处理大批句柄而作改进的poll,是Linux下多路复用IO接口select/poll的增强版本,它能显著的 ...

  8. Centos7 编译安装 Nginx PHP Mariadb Memcached 扩展 ZendOpcache扩展 (实测 笔记 Centos 7.3 + Mariadb 10.1.20 + Nginx 1.10.2 + PHP 7.1.0 + Laravel 5.3 )

    环境: 系统硬件:vmware vsphere (CPU:2*4核,内存2G,双网卡) 系统版本:CentOS-7-x86_64-Minimal-1611.iso 安装步骤: 1.准备 1.0 查看硬 ...

  9. CentOS7 编译安装 Mongodb (实测 笔记 Centos 7.0 + Mongodb 2.6.6)

    环境: 系统硬件:vmware vsphere (CPU:2*4核,内存2G,双网卡) 系统版本:CentOS-7.0-1406-x86_64-DVD.iso 安装步骤: 1.准备 1.1 显示系统版 ...

随机推荐

  1. 每天一个linux命令(25):df 命令

    linux中df命令的功能是用来检查linux服务器的文件系统的磁盘空间占用情况.可以利用该命令来获取硬盘被占用了多少空间,目前还剩下多少空间等信息. 1.命令格式: df [选项] [文件] 2.命 ...

  2. HDU 1171 Big Event in HDU 多重背包二进制优化

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1171 Big Event in HDU Time Limit: 10000/5000 MS (Jav ...

  3. 关于ActionContext.getContext()的用法

    为了避免与Servlet API耦合在一起,方便Action类做单元测试,Struts 2对HttpServletRequest.HttpSession和ServletContext进行了封装,构造了 ...

  4. 【poj1090】 Chain

    http://poj.org/problem?id=1090 (题目链接) 题意 给出九连环的初始状态,要求将环全部取下需要走多少步. Solution 格雷码:神犇博客 当然递推也可以做. 代码 / ...

  5. PL/0编译器(java version) - Err.java

    1: package compiler; 2:   3: import java.io.BufferedWriter; 4:   5: public class Err { 6:   7: publi ...

  6. CSS3系列三(与背景边框相关样式 、变形处理、动画效果)

    与背景相关的新增属性 大家都知道在HTML页面中,元素都是由以下几部分组成 使用background-clip来修改背景的显示范围,如果设定为border-box,则背景范围包含边框区域,如果设定为p ...

  7. goto,void,extern,sizeof实例

    1.#include <stdio.h>void func(int n){    int* p = NULL;    if(  n < 0 )    {        goto ST ...

  8. PHP中GD2的运用,注意编码格式的改变,以及head()函数之前不能有任何html元素包括空格!!!

    <?php header ( "Content-type: text/html; charset=utf-8" ); //设置文件编码格式 header("Cont ...

  9. emmet使用 及 notepadd++ emmet的安装

    emmet的使用的参考文章:http://www.cnblogs.com/sussski/p/3544744.html html:4s.html:4t.html:5或! +.>.^:层次 *.@ ...

  10. Nginx变量的实现机制

    Nginx有两种定义变量的方式,一种是在配置文件中使用set指令(由rewrite模块提供支持),另一种是在模块内定义变量. 变量相关结构体: struct ngx_http_variable_s { ...