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. Git代码管理心得

    一.概述: 这次按照要求进行了看似复杂,实则非常复杂并且麻烦(网上教程众多且啰嗦)的对git使用的学习,从星期六晚18:48我准备这次作业开始,直到了晚上22:44才结束电脑上的操作···(导致这篇随 ...

  2. Struts2+Jquery实现ajax并返回json类型数据

    来源于:http://my.oschina.net/simpleton/blog/139212 摘要 主要实现步骤如下: 1.JSP页面使用脚本代码执行ajax请求 2.Action中查询出需要返回的 ...

  3. TS

    //html文件 <!DOCTYPE html> <html lang="en"> <head> <meta charset=" ...

  4. 【CSU 1556】Pseudoprime numbers

    题 Description Jerry is caught by Tom. He was penned up in one room with a door, which only can be op ...

  5. java系统高并发解决方案(转载)

    转载博客地址:http://blog.csdn.net/zxl333/article/details/8454319 转载博客地址:http://blog.csdn.net/zxl333/articl ...

  6. TYVJ1038 忠诚

    hzw学长博客里的2048,根本停不下来! 描述 老管家是一个聪明能干的人.他为财主工作了整整10年,财主为了让自已账目更加清楚.要 求管家每天记k次账,由于管家聪明能干,因而管家总是让财主十分满意. ...

  7. FireFox & Chrome 使用技巧

    一 FireFox 1 安装调试工具 Firebug , HttpRequester 2 打开响应式布局 打开菜单 -> 开发者 -> 响应式设计视图 二 Chrome 1 修改Chrom ...

  8. 浅谈datagrid详细操作单元格样式

    http://www.easyui.info/archives/470.html 今天有朋友问到:“如果设置列标题居中而列内容居右显示?”,仔细查了一下api,目前版本提供了两个相关的列属性,alig ...

  9. Android实战_来电拦截专家

    1 项目演示: 2 代码演示: 1)MainActivity类代码: MainActivity类代码: package com.example.phoneinteceptor_one;import j ...

  10. Spring学习7-Spring整合Hibernate

    一.Springl为什么要整合Hibernate   二者的整合主要是把hibernate中核心的一些类型交给spring管理,这些类型主要包括sessionFactory. transactionM ...