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:

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

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

        sudo yum install zlib
      sudo yum install zlib-devel
    • Install bzip2:

        sudo yum install bzip2
      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. 团队项目--关于QQ项目的运行和总结

    目前为止该QQ项目实现如下功能:添加好友到好友列表,可以把好友在不同分类中移动,同时支持离线查找添加好友,离线更换头像,离线发送消息,保存所有好友聊天记录,发送窗口抖动,查看对方信息,更改/添加信息等 ...

  2. u1-nav-css

    header:before, header:after ,.navigation:before, .navigation:after,.nav-row:before, .nav-row:after,. ...

  3. python 生成器

    摘自:http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000/00138681965108 ...

  4. Java基础-四要素之一《抽象》(接口)

    抽象的概念就是抽象出共同属性:成员变量和方法 定义抽象使用abstract关键字定义抽象类和方法 抽象类 abstract class 包含抽象方法的类,叫抽象类. 所以抽象类可以有private等多 ...

  5. (BZOJ4538)HNOI2016 网络

    HNOI2016 Day1 T2 网络 Description 一个简单的网络系统可以被描述成一棵无根树.每个节点为一个服务器.连接服务器与服务器的数据线则看做一条树边.两个服务器进行数据的交互时,数 ...

  6. 洛谷P1203 [USACO1.1]坏掉的项链Broken Necklace

    题目描述 你有一条由N个红色的,白色的,或蓝色的珠子组成的项链(3<=N<=350),珠子是随意安排的. 这里是 n=29 的二个例子: 第一和第二个珠子在图片中已经被作记号. 图片 A ...

  7. Java线程之间通信

    用多线程的目的:更好的利用CPU的资源.因为所有的多线程代码都可以用单线程来实现. 多线程:指的是这个程序(一个进程)运行时产生了不止一个线程. 并行:多个CPU实例或者多台机器同时执行一段处理逻辑, ...

  8. API与软件架构

    http://blog.csdn.net/horkychen/article/details/46612899 从架构设计的角度来看(所谓的组成论),软件系统就是模块和接口. 模块(层次/组件)决定分 ...

  9. 使用servletAPI三种方式简单示例

    一.直接实现Action接口或集成ActionSupport类(推荐) public class HelloAction implements Action { @Override public St ...

  10. JS触发事件大全

          事件 浏览器支持 解说 一般事件 onclick IE3.N2 鼠标点击时触发此事件 ondblclick IE4.N4 鼠标双击时触发此事件 onmousedown IE4.N4 按下鼠 ...