代码改变世界

安装thrift

  轩脉刃  阅读(2274)  评论(0编辑  收藏  举报

要求

thrift至少需要支持三种语言:

  • Java
  • PHP
  • Go

预安装

基本教程:

http://thrift.apache.org/docs/install/centos

使用最新的thrift,不要使用9.2版本以下

安装autoconf

wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar xvf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/usr
make
sudo make install
cd ..

安装automake

wget http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz
tar xvf automake-1.14.tar.gz
cd automake-1.14
./configure --prefix=/usr
make
sudo make install
cd ..

安装bison

wget http://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.gz
tar xvf bison-2.5.1.tar.gz
cd bison-2.5.1
./configure --prefix=/usr
make
sudo make install
cd ..

更新boost

wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz
tar xvf boost_1_55_0.tar.gz
cd boost_1_55_0
./bootstrap.sh
sudo ./b2 install

安装java环境

yum install ant
rpm -Uvh jdk-7u75-linux-x64.rpm

安装php环境

php版本5.5

安装go环境

设置GOPATH
设置GOROOT

安装thrift

git clone https://git-wip-us.apache.org/repos/asf/thrift.git
cd thrift
./bootstrap.sh

./configure --without-tests --without-ruby --without-python --with-php --with-go --with-lua=no --without-nodejs --with-java
make
make install
(如果在test环境有报错,可以忽略)
编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· .NET周刊【3月第1期 2025-03-02】
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· [AI/GPT/综述] AI Agent的设计模式综述
历史上的今天:
2014-03-13 sphinx 配置文件全解析
2012-03-13 Webdis内部解析
点击右上角即可分享
微信分享提示