rocksdb 编译安装 日志
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 testsmake 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 runmake 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:
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
- Upgrade your gcc to version at least 4.7 to get C++11 support:
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).
- If you're first time developer in MacOS, you still need to run:
- Update XCode: run
- run
brew install rocksdb
- Install latest C++ compiler that supports C++ 11:
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
andIOS_CROSS_COMPILE
.
- Run:
rocksdb 编译安装 日志的更多相关文章
- Nginx服务编译安装、日志功能、状态模块及访问认证模式实操
系统环境 [root@web ~]# cat /etc/redhat-release CentOS release 6.9 (Final) [root@web ~]# uname -a Linux d ...
- linux下rocksdb的编译安装
RocksDB起源于Facebook的实验室项目,实现了一个高性能的快速存储器,是基于C++编写的key value数据库,很多软件都是采用内置rocksdb的方式运行,所以需要我们提前安装rocks ...
- 编译安装zabbix3.2
1.1 环境准备 系统环境准备:redhat 6.6 64位mysql-5.6.34php-5.6.28zabbix-3.2.1配置前先关闭iptables和SELINUX,避免安装过程中报错. # ...
- ubuntu10.04编译安装LAMP
ubuntu10.04编译安装LAMP以及简单wordpress的使用 : http://linuxme.blog.51cto.com/1850814/971631 一.源码安装LAMP 网上有一堆关 ...
- CentOS 7.1编译安装PHP7
原文: https://typecodes.com/web/centos7compilephp7.html?utm_source=tuicool&utm_medium=referral 1 创 ...
- Linux下编译安装MariaDB
MariaDB是MySQL的一个开源分支,主要是社区在维护,并且完全兼容MySQL,并且可以很方便的称为MySQL的替代,MariaDB的诞生正是出自MySQL创始人Michael Widenius之 ...
- CentOS7 编译安装 nginx-1.10.0
对于NGINX 支持epoll模型 epoll模型的优点 定义: epoll是Linux内核为处理大批句柄而作改进的poll,是Linux下多路复用IO接口select/poll的增强版本,它能显著的 ...
- 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 查看硬 ...
- 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 显示系统版 ...
随机推荐
- 每天一个linux命令(25):df 命令
linux中df命令的功能是用来检查linux服务器的文件系统的磁盘空间占用情况.可以利用该命令来获取硬盘被占用了多少空间,目前还剩下多少空间等信息. 1.命令格式: df [选项] [文件] 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 ...
- 关于ActionContext.getContext()的用法
为了避免与Servlet API耦合在一起,方便Action类做单元测试,Struts 2对HttpServletRequest.HttpSession和ServletContext进行了封装,构造了 ...
- 【poj1090】 Chain
http://poj.org/problem?id=1090 (题目链接) 题意 给出九连环的初始状态,要求将环全部取下需要走多少步. Solution 格雷码:神犇博客 当然递推也可以做. 代码 / ...
- PL/0编译器(java version) - Err.java
1: package compiler; 2: 3: import java.io.BufferedWriter; 4: 5: public class Err { 6: 7: publi ...
- CSS3系列三(与背景边框相关样式 、变形处理、动画效果)
与背景相关的新增属性 大家都知道在HTML页面中,元素都是由以下几部分组成 使用background-clip来修改背景的显示范围,如果设定为border-box,则背景范围包含边框区域,如果设定为p ...
- goto,void,extern,sizeof实例
1.#include <stdio.h>void func(int n){ int* p = NULL; if( n < 0 ) { goto ST ...
- PHP中GD2的运用,注意编码格式的改变,以及head()函数之前不能有任何html元素包括空格!!!
<?php header ( "Content-type: text/html; charset=utf-8" ); //设置文件编码格式 header("Cont ...
- emmet使用 及 notepadd++ emmet的安装
emmet的使用的参考文章:http://www.cnblogs.com/sussski/p/3544744.html html:4s.html:4t.html:5或! +.>.^:层次 *.@ ...
- Nginx变量的实现机制
Nginx有两种定义变量的方式,一种是在配置文件中使用set指令(由rewrite模块提供支持),另一种是在模块内定义变量. 变量相关结构体: struct ngx_http_variable_s { ...