公司的机器都是Redhat,所以边装边记录一下安装过程。安装过程参考文档:

  • Thrift依赖的软件:http://wiki.apache.org/thrift/ThriftRequirements
  • 官方安装指南:http://wiki.apache.org/thrift/ThriftInstallation

Step1:安装依赖

  • autoconf版本低需要升级。./configue –prefix /usr, make, make install经典三步搞定
  • libtool版本低需要升级。./configue –prefix /usr, make, make install经典三步搞定
  • zlib版本低需要升级。./configue, make, make install经典三步搞定
  • 安装boost。./bootstrap.sh, ./bjam, ./bjam install
  • 安装ant。
  • 安装SLFJ,把它的jar包放在类路径下就好了。thrift java api运行的时候需要。

Step2:下载和编译Thrift

  • 下载:wget http://apache.etoak.com/incubator/thrift/0.2.0-incubating/thrift-0.2.0-incubating.tar.gz
  • tar -zxvf thrift-0.2.0-incubating.tar.gz
  • cd thrift-0.2.0
  • ./bootstrap.sh
  • ./configure, make, make install

Step3:生成运行时(Runtime)

  • cd ./lib/java
  • ant 生成libthrift.jar(thrift的java运行时)
  • cd ../python
  • python setup.py install(生成python运行时)
  • cd ../php
  • php的运行时我没有生成,因为它没有提供自动脚本,而需要手动操作。

相关文章:

  • 2021-06-28
  • 2021-11-26
  • 2022-03-06
  • 2021-12-08
  • 2021-06-09
  • 2021-10-15
  • 2021-11-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2021-09-04
  • 2022-02-27
  • 2021-08-04
  • 2022-12-23
相关资源
相似解决方案