本文介绍了flockdb-有没有人从git成功构建并安装它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试从git的源代码构建flockdb,但无法执行.我正在使用Mac OSX 10.6,但在节俭/增强安装过程中遇到了很多问题.有没有人成功构建并安装它.赞赏有关执行此操作的信息的任何指针(flockdb git网站中的指针除外).

I tried building flockdb from the sources from git, but couldn't do it. Am using Mac OSX 10.6 and getting lot of issues in thrift/boost installations. Has anyone successfully build it and installed it. Appreciate any pointer to information on doing this (except the one from flockdb git site).

我也不了解Scala,但是有没有现成的flockdb安装文件可以在Mac/Linux/Windows上安装它?

Also, I don't know about Scala, but is there any readily available flockdb installation file to install it on Mac/Linux/Windows?

谢谢.

推荐答案

我刚刚在Ubuntu 12.04下的amazon/ec2机器上成功安装了flockdb.

I just successfully installed flockdb on an amazon/ec2 machine under Ubuntu 12.04.

  • sudo apt-get update
  • sudo apt-get install openjdk-6-jdk
  • sudo apt-get update
  • sudo apt-get install openjdk-6-jdk
  • 安装构建工具和节俭依赖项:
  • sudo apt-get -y install subversion g++ make flex bison python-dev libboost-dev libevent-dev automake pkg-config libtool make
  • 从以下地址下载Thrift 0.5.0的副本: http://archive.apache.org/dist/incubator/thrift/0.5.0-incubating/
  • wget http://archive.apache.org/dist/incubator/thrift/0.5.0-incubating/thrift-0.5.0.tar.gz
  • tar zxvf thrift-0.5.0.tar.gz; cd thrift-0.5.0
  • ./configure
  • make
  • sudo make install
  • 安装ruby客户端
  • cd lib/rb/
  • sudo ruby setup.rb config
  • sudo ruby setup.rb install
  • install build tools and thrift dependencies:
  • sudo apt-get -y install subversion g++ make flex bison python-dev libboost-dev libevent-dev automake pkg-config libtool make
  • download a copy of thrift 0.5.0 from: http://archive.apache.org/dist/incubator/thrift/0.5.0-incubating/
  • wget http://archive.apache.org/dist/incubator/thrift/0.5.0-incubating/thrift-0.5.0.tar.gz
  • tar zxvf thrift-0.5.0.tar.gz; cd thrift-0.5.0
  • ./configure
  • make
  • sudo make install
  • Install ruby client
  • cd lib/rb/
  • sudo ruby setup.rb config
  • sudo ruby setup.rb install
  • https://github.com/harrah/xsbt/wiki/Getting-Started-Setup
  • http://www.scala-sbt.org/0.7.7/docs/Setup.html

可以从Typesafe Debian存储库中获得sbt软件包.

The sbt package is available from the Typesafe Debian Repository.

  • 安装deb,以将typesafe debian存储库添加到批准的源列表中.
  • wget http://apt.typesafe.com/repo-deb-build-0002.deb
  • sudo dpkg -i repo-deb-build-0002.deb
  • sudo apt-get update
  • sudo apt-get install sbt
  • 下载sbt启动器:
  • wget http://simple-build-tool.googlecode.com/files/sbt-launch-0.7.4.jar
  • mv sbt-launch-0.7.4.jar ~/bin/sbt-launch.jar
  • 创建~/bin/sbt文件并使其可执行:
  • java -Xmx512M -jar目录名$ 0 /sbt-launch.jar "$@"
  • chmod u+x ~/bin/sbt
  • 修改~/.bashrc:export PATH=${PATH}:$HOME/bin
  • source ~/.bashrc
  • Install the deb to add the typesafe debian repository to your list of approved sources.
  • wget http://apt.typesafe.com/repo-deb-build-0002.deb
  • sudo dpkg -i repo-deb-build-0002.deb
  • sudo apt-get update
  • sudo apt-get install sbt
  • download sbt launcher:
  • wget http://simple-build-tool.googlecode.com/files/sbt-launch-0.7.4.jar
  • mv sbt-launch-0.7.4.jar ~/bin/sbt-launch.jar
  • create ~/bin/sbt file and make it excutable:
  • java -Xmx512M -jardirname $0/sbt-launch.jar "$@"
  • chmod u+x ~/bin/sbt
  • modify ~/.bashrc: export PATH=${PATH}:$HOME/bin
  • source ~/.bashrc
  • https://github.com/twitter/flockdb/blob/master/README.markdown
  • https://github.com/twitter/flockdb/blob/master/doc/demo.markdown
  • git clone https://github.com/twitter/flockdb.git
  • cd flockdb
  • sbt update.您将看到类似以下的输出.
  • git clone https://github.com/twitter/flockdb.git
  • cd flockdb
  • sbt update. You will see the outputs like below.

......
[info] == update ==
[success] Successful.
[info] 
[info] Total time: 213 s, completed Jan 7, 2013 11:02:48 PM
[info] 
[info] Total session time: 267 s, completed Jan 7, 2013 11:02:48 PM
[success] Build completed successfully.

  • 无需测试先构建package-dist:NO_TESTS=1 sbt package-dist.您将看到类似以下的输出.
    • build package-dist without test first: NO_TESTS=1 sbt package-dist. You will see the outputs like below.
    • 
      ......
      [info] == package-dist ==
      [info] Packaging ./dist/flockdb-3e351842.zip ...
      [info] Packaging complete.
      [info] == package-dist ==
      [success] Successful.
      [info] 
      [info] Total time: 7 s, completed Jan 7, 2013 11:09:51 PM
      [info] 
      [info] Total session time: 8 s, completed Jan 7, 2013 11:09:51 PM
      [success] Build completed successfully.
      

      安装mysql服务器

      • sudo apt-get install mysql-server,然后设置环境变量:
      • export DB_USERNAME="root"
      • export DB_PASSWORD="password"
      • Install mysql-server

        • sudo apt-get install mysql-server, then setting env variables:
        • export DB_USERNAME="root"
        • export DB_PASSWORD="password"
          • 如果以上所有操作均成功,则cd flockdb并继续尝试sbt package-dist.您将看到类似以下的输出.
          • if all above succeed, cd flockdb and go ahead to try sbt package-dist. You will see the outputs like below.
          
          [info] Passed: : Total 265, Failed 0, Errors 0, Passed 265, Skipped 0
          [info]  
          [info] All tests PASSED.
          [info] == test-finish ==
          [info] 
          [info] == test-cleanup ==
          [info] == test-cleanup ==
          [info] 
          [info] == package-dist ==
          [info] Packaging ./dist/flockdb-3e351842.zip ...
          [info] Packaging complete.
          [info] == package-dist ==
          [success] Successful.
          [info] 
          [info] Total time: 137 s, completed Jan 7, 2013 11:47:54 PM
          [info] 
          [info] Total session time: 138 s, completed Jan 7, 2013 11:47:54 PM
          [success] Build completed successfully.
          

          安装gizzmo并启动flockdb

          只需遵循twitter-flockdb中的教程: https://github .com/twitter/flockdb/blob/master/doc/demo.markdown

          • sudo apt-get install python-setuptools
          • sudo python setup.py install for below two python modules
          • Install thrift python client: http://pypi.python.org/pypi/thrift/0.9.0
          • Install flockdb python client: https://github.com/pyronicide/python-flockdb/blob/master/README.md
          
          >>> import flockdb
          >>> client = flockdb.Client("localhost", 7915, {
          ...     "follows": 1,
          ...     "blocks": 2,
          ...     })
          >>> client.add(1, "follows", 2)
          >>> client.remove(1, "follows", 2)
          >>> client.get(1, "follows", None)
          ()
          >>> client.add(1, "follows", 2)
          >>> client.get(1, "follows", None)
          (2,)
          >>> client.get(None, "follows", 2)
          (1,)
          >>> client.get_all([(1, "follows", 2), (2, "follows", 3)])
          [(2,), ()]
          

          这篇关于flockdb-有没有人从git成功构建并安装它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 05:54