Install ssdb-rocks on CentOS 6

C.C.  发表于 2014年08月10日 20:14 | Hits: 649

为了优化节操精选的弹幕系统,打算更换到Facebook的RocksDB测试,为了支持多台Web Server的场景,打算直接上ssdb-rocks来完成目的,如果有这个需求的朋友还遇到过坑,可以参考一下步骤:

RocksDB需要的依赖

yum install zlib zlib-devel bzip2 bzip2-devel gflags gflags-devel snappy snappy-devel

RocksDB需要的gcc47-c++

  1. cd /etc/yum.repos.d/
  2. wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo
  3. yum --enablerepo=testing-1.1-devtools-6 install devtoolset-1.1-gcc devtoolset-1.1-gcc-c++
  4. 导入环境变量
export CC=/opt/centos/devtoolset-1.1/root/usr/bin/gcc
export CPP=/opt/centos/devtoolset-1.1/root/usr/bin/cpp
export CXX=/opt/centos/devtoolset-1.1/root/usr/bin/c++

安装ssdb-rocks

  1. git clone https://github.com/ideawu/ssdb-rocks.git
  2. make && make install

注意:上面是我fork的原作者的库做了修改,如果使用作者的git repo安装可能会遇到下面的错误:2014-08-11现在的版本已经Fix了

/home/docker-cc/Downloads/ssdb-rocks/deps/rocksdb-master/librocksdb.a(env_posix.o): In function `rocksdb::(anonymous namespace)::PosixEnv::NowNanos()':
/home/docker-cc/Downloads/ssdb-rocks/deps/rocksdb-master/util/env_posix.cc:1342: undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/docker-cc/Downloads/ssdb-rocks/src'
make: *** [all] Error 2

修改build.sh文件,把:

case "$TARGET_OS" in
Darwin)
#PLATFORM_CLIBS="-pthread"
#PLATFORM_CFLAGS=""
;;
Linux)
PLATFORM_CLIBS="-pthread"
;

中的Linux)部分修改成“-pthread -lrt"就好了

原文链接: http://onlyvc.us/install-ssdb-rocks-on-centos-6/

Install ssdb-rocks on CentOS 6的更多相关文章

  1. Install .Net Core For CentOS

    Install .NET Core SDK Before you start, please remove any previous versions of .NET Core from your s ...

  2. [转载]How to Install Firefox 33 on CentOS, Redhat and Other Linux Distributions

    FROM: http://tecadmin.net/install-firefox-on-linux/ Firefox 33 has been released for Systems and And ...

  3. Install RabbitMQ server in CentOS 7

    About RabbitMQ RabbitMQ is an open source message broker software, also sometimes known as message-o ...

  4. Install Docker Engine on CentOS 在CentOS 7 上安装Docker

    Install Docker Engine on CentOS OS Requirements 系统要求 To install Docker Engine,you need a maintained ...

  5. Centos 7.5 通过yum安装GNOME Desktop时出现:file /boot/efi/EFI/centos from install of fwupdate-efi-12-5.el7.centos.x86_64 conflicts with file from package grub2-common-1:2.02-0.65.el7.centos.2.noarch

    系统版本为: [root@s10 ~]# cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core) 由于管理kvm虚拟机的需求,需要安装 ...

  6. 转载--How to Install VMware Tools on CentOS 6.3

    源地址:http://www.ehowstuff.com/how-to-install-vmware-tools-on-centos-6-3/ VMware Tools is a group of u ...

  7. install keepalived on RedHat/CentOS to provide IP failover for web cluster

    Contents [hide]  1 Introduction 2 Our Sample Setup 3 Install Keepalived 4 Install Kernel Headers 5 C ...

  8. install erlang environment on centos

    #(erlide in linux can't detect the runtime if build from source, but erlang shell works correctly)su ...

  9. CentOS7: How to install Desktop Environments on CentOS 7?

    1. Installing GNOME-Desktop: Install GNOME Desktop Environment on here. # yum -y groups install &quo ...

  10. install docker swarm on centos

    ref: https://sonnguyen.ws/install-docker-docker-swarm-centos7/ https://hostadvice.com/how-to/how-to- ...

随机推荐

  1. jQuery使用之(二)设置元素的样式

    css是页面不能分隔的部分,jQuery中也提供了一些css相关的实用的办法.前面章节中有使用过 addClass()为元素添加css样式风格.本节主要介绍jQuery如何设置页面的样式风格.包括添加 ...

  2. c# JD快速搜索工具,2015分析JD搜索报文,模拟请求搜索数据,快速定位宝贝排行位置。

    分析JD搜索报文 搜索关键字 女装 第二页,分2次加载. rt=1&stop=1&click=&psort=&page=3http://search.jd.com/Se ...

  3. MongoDB 客户端 MongoVue

    直接上图片,图片是按顺序来的 软件下载地址(Windows下的MongoDB客户端MongoVUE 这是最后一个全功能的不收费的版本): http://pan.baidu.com/s/1skYIEq5

  4. No plugin found for prefix 'jetty' in the current project and in the plugin groups 【转】

    在maven进行jetty的调试中出现错误: [plain] view plaincopyprint? [ERROR] No plugin found for prefix 'jetty' in th ...

  5. 5.9-2比较str1和str2截取后的子串

    package zfc; public class ZfcShcq { public static void main(String[] args) { // TODO Auto-generated ...

  6. 50行代码仿backbone_todos

    <!doctype html> <html> <head> <meta charset="utf-8"> <title> ...

  7. js获取select改变事件

    js获取select改变事件onchage前的值 和 onclick事件 <select id="wupin_id" name="wupin_id" on ...

  8. 【Gym 100971A】Treasure Island

    题意 题目链接给你一个地图,'#'代表水,'.'代表陆地,'?'代表擦去的地图,可能是'#'也可能是'.'.地图中本该只有一块相连的陆地,若只有一种方案则输出确定的地图.若有多种方案,则输出‘Ambi ...

  9. 【Gym 100015B】Ball Painting

    题 There are 2N white balls on a table in two rows, making a nice 2-by-N rectangle. Jon has a big pai ...

  10. str内部方法

    代码 #str内部功能 name=' aK am\til.L iu' age=18 num=-11 ab='#' ac=('1','2','3','4','5','6','7') print(dir( ...