读书人

ubuntu 装配thrift

发布时间: 2012-09-25 09:55:59 作者: rapoo

ubuntu 安装thrift

?

?

安装ant和ivy,

1。下载

? ? ant下载地址:http://ant.apache.org/下载apache-ant-1.8.1-bin.tar.gz(当前最新版本),将该下载包拷贝到/usr/local下(随意了,找个地方就好)

?

2。解压

? ? ?cd /usr/local ?

? ? ?tar -zxvf apache-ant-1.8.1-bin.tar.gz

?

? ? ?解压后会在/usr/local 下生成一个文件夹apache-ant-1.8.1

3.配置环境变量。

export ANT_HOME=/usr/local/apache-ant-1.7.1 ?

PATH=$ANT_HOME/bin:$PATH ?

ant已经配置完成。

4.解压sudo tar xzvf apache-ivy-2.2.0-bin-with-deps.tar.gz -C /usr/local ?

拷贝 ivy-2.2.0.jar 到/usr/local/apache-ant-1.8.1/lib/下

5.到apache官网下载最新版本的thrift压缩包。 thrift-0.8.0.tar.gz

6.安装thrift需要的依赖包

? ? sudo apt-get install build-essential ?

? ? sudo apt-get install bison flex ?

? ? sudo apt-get install libboost-dev python-dev ?

? ? sudo apt-get install autoconf automake libtool pkg-config ?

? ? sudo apt-get install git ?

7。解压tar -zxvf thrift-0.8.0.tar.gz

cd thrift-0.8.0?

./configure --prefix=/usr/local/指定编译路径

make && make install 编译完成。


读书人网 >移动开发

热点推荐