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. 原型图利器 – Mockplus的审阅功能

    Mockplus是一款简洁快速的原型图工具 (http://www.mockplus.cn),最近推出了审阅功能. 审阅,旨在解决团队项目原型设计中的沟通和协作的问题. 没有孤立的原型,更没有一次成型 ...

  2. HDU 5973 Game of Taking Stones 威佐夫博弈+大数

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5973 Game of Taking Stones Time Limit: 2000/1000 MS ...

  3. python 条件判断和循环

    一.条件判断    if if  age>= 18: 记住在判断语句后面要加上     : 还有要注意他的缩进 age = 20if age >= 18: print 'your age ...

  4. JMeter工具的使用-ForEach

    1,Add Thread group this detail information about this panel as below link http://jmeter.apache.org/u ...

  5. PHP 数据库驱动、连接数据不同方式学习笔记

    相关学习资料 http://www.php.net/manual/zh/refs.database.php http://www.php.net/manual/zh/internals2.pdo.ph ...

  6. C#文件复制功能

    目的是将用户自定义文件复制到指定文件夹并且能查看该文件,下面是个人做的源码: sing System; using System.Collections.Generic; using System.C ...

  7. Android 系统属性SystemProperty分析

     http://www.cnblogs.com/bastard/archive/2012/10/11/2720314.html Android System Property 一 System Pro ...

  8. POJ2676Sudoku(类似于八皇后)

    Sudoku Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 16444   Accepted: 8035   Special ...

  9. Spring学习4-面向切面(AOP)之aspectj注解方式

    一.简介    1.AOP用在哪些方面:AOP能够将那些与业务无关,却为业务模块所共同调用的逻辑或责任,例如事务处理.日志管理.权限控制,异常处理等,封装起来,便于减少系统的重复代码,降低模块间的耦合 ...

  10. 动态下载 Yahoo 网络数据存入 Microsoft SQL Server 再 Matlab 调用的一个完整例子

    % 编程环境: Matlab 2014a, win7 32bit, Microsoft SQL Server 2008r2 %% % 清屏 clc; clear all; close all; %% ...