Install ssdb-rocks on CentOS 6

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/

时间: 2024-10-18 00:48:16

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

Install Nginx/PHP-FPM on CentOS/RHEL

Install Nginx, PHP 5.5.15 and PHP-FPM on Fedora 20/19/18/17, CentOS 7/6.5/5.10, Red Hat (RHEL) 7/6.5/5.10 1. Change to root user. su 2. Install needed repositories CentOS 7/6.5/5.10 and Red Hat (RHEL) 7/6.5/5.10 Remi repository  ## Remi Dependency on

Install .Net Core For CentOS 6.5(最后失败了)

Install .NET Core SDK Before you start, please remove any previous versions of .NET Core from your system. In order to install .NET Core 1.1 on CentOS or Oracle Linux, first you need to get the prerequisites and then you download the .NET Core SDK bi

[转载]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 Android on October 13, 2014 with various bug fixes and updates. Below is the list of few changes which is made in Firefox 33. Read more details about thi

How to install redis server on CentOS 7 / RHEL 7

How to install redis server on CentOS 7 / RHEL 7 October 4, 2014 by sharad chhetri Leave a Comment In this tutorial we will learn, how to install redis server on CentOS 7 / RHEL 7 . The abbreviation of redis is REmote DIctionary Server. It is one the

Install CDH5.11 on CentOS 7

##1)Environment initialization Note:At least three nodes,  the Master node at least 6G of memory,  and the other two at least 4G of memory |--------------|-----------|-------------|----------------|-----------|--------------------|-------------| | Ho

cuda install for caffe at centos 总结

cuda install at centos 全过程. 2015年5月15日,亲测通过. wget http://developer.download.nvidia.com/compute/cuda/repos/rhel6/x86_64/cuda-repo-rhel6-7.0-28.x86_64.rpm rpm -ivh cuda-repo-rhel6-7.0-28.x86_64.rpm wget http://pkgs.repoforge.org/rpmforge-release/rpmfor

Install Open vSwitch on CentOS

转载:http://cloud-mate.org/2015/06/installing-open-vswitch-centos-cloudstack/ June 5, 2015  Stuart Nelson  CloudStack, Openstack Installing Open vSwitch on CentOS 6.6 I would like to use Open vSwitch on my KVM nodes in my CloudStack deployment. I will

How to install VNC server on CentOS 6

参考: https://rbgeek.wordpress.com/2012/06/26/how-to-install-vnc-server-on-centos-6/ VNC is a protocol that is used to share the desktop with other users/computers over the network/Internet.In order to share a desktop, VNC server must be install and co

PostgreSQL 11 install with jit on CentOS 7.5 X64

1.system infoCentOS Linux release 7.5.1804 X86_64 2.disable selinux and firewalld install require os packages-# yum install -y epel-release-# yum install -y gcc gcc-c++ readline-devel zlib-devel libicu-devel 4.llvm install1).cmake-# wget https://cmak

Install VMware Tools in CentOS 7 command line mode

1.首先启动CentOS 7,在VMware中点击上方“VM”,点击“Install VMware Tools...”(如已安装则显示“Reinstall VMware Tools...”). 2.在命令行输入“ls /dev”查看. 3.输入“mkdir /mnt/cdrom”在/mnt目录下新建一个名为cdrom的文件夹. 4.输入“mount -t iso9660 /dev/cdrom /mnt/cdrom”将光盘挂载到/mnt/cdrom目录下. 5.输入“ls /mnt/cdrom/”