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. 每天一个linux命令(38):vmstat命令

    vmstat 是Virtual Meomory Statistics(虚拟内存统计)的缩写,可对操作系统的虚拟内存.进程.CPU活动进行监控.他是对系统的整体 情况进行统计,不足之处是无法对某个进程进 ...

  2. 每天一个linux命令(6):mv命令

    mv命令是move的缩写,可以用来移动文件或者将文件改名(move (rename) files),是Linux系统下常用的命令,经常用来备份文件或者目录. 1.命令格式: mv [选项] 源文件或目 ...

  3. ncdu 磁盘目录查看工具

    我平时都是直接yum -y install ncdu,但是今天失败了. 所以: 安装EPEL源 CentOS/RHEL 5 : rpm -Uvh https://dl.fedoraproject.or ...

  4. log4net将日志进行分类,保存到不同的目录当中

    1.新建Logs的Class类:代码如下: public class ApiLogs { public static int Log_Level { get; set; } private stati ...

  5. 【HDU 3966】Aragorn's Story(未完待续)

    我无限Runtime Error(ACCESS_VIOLATION).不知道怎么搞得/(ㄒoㄒ)/~~ #pragma comment(linker, "/STACK:1024000000, ...

  6. Html-Css-a标签的使用

    a标签去掉下划线 a{ text-decoration:none; } 或者把这个属性分别加到a标签下, a:link{ text-decoration:none; } a:visited{ text ...

  7. CSS3媒体查询

    随着响应式设计模型的诞生,Web网站又要发生翻天腹地的改革浪潮,可能有些人会觉得在国内IE6用户居高不下的情况下,这些新的技术还不会广泛的蔓延下去,那你就错了,如今淘宝,凡客,携程等等公司都已经在大胆 ...

  8. 宿主机( win 7 系统) ping 虚拟机VMware( cent os 6.6 ) 出现“请求超时”或者“无法访问目标主机”的解决方法

    首先虚拟机的网络连接设置为"Host-only": 然后在 cmd 窗口中查看 VMnet1 的 ip 地址,这里是 192.168.254.1 接下来在 Linux 中设置网卡地 ...

  9. cogs896 圈奶牛

    描述 农夫约翰想要建造一个围栏用来围住他的奶牛,可是他资金匮乏.他建造的围栏必须包括他的奶牛喜欢吃草的所有地点.对于给出的这些地点的坐标,计算最短的能够围住这些点的围栏的长度. PROGRAM NAM ...

  10. 配置Junit测试程序

    第一步:加载所需要的包:右键-->Build Path-->Configure Build Path-->Libraries-->Add Library-->Junit ...