centos7安装thrift
1. 升级所有软件包
yum -y update
2.安装开发工具
yum -y groupinstall "Development Tools"
3.安装wget
yum -y install wget
4.升级autoconf/automake/bison
autoconf和automake两个工具来帮助我们自动地生成符合自由软件惯例的Makefile
GNU bison 是属于 GNU 项目的一个语法分析器生成器。Bison 把一个关于“向前查看 从左到右 最右”(LALR) 上下文无关文法的描述转化成可以分析该文法的 C 或 C++ 程序。它也可以为二义文法生成 “通用的 从左到右 最右” (GLR)语法分析器。(from百度百科)
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar -zxvf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/usr
make
make install
wget http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz
tar -zxvf automake-1.14.tar.gz
cd automake-1.14
./configure --prefix=/usr
make
make install
wget http://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.gz
tar -zxvf bison-2.5..tar.gz
cd bison-2.5.
./configure --prefix=/usr
make
make install
5. 安装C++依赖
yum -y install libevent-devel zlib-devel openssl-devel
6. 升级boost(Boost库是为C++语言标准库提供扩展的一些C++程序库的总称)
wget -O boost_1_55_0.tar.bz2 http://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fboost%2Ffiles%2Fboost%2F1.55.0%2F&ts=1385953406&use_mirror=softlayer-ams tar jxvf boost_1_55_0.tar.bz2
cd boost_1_55_0
./bootstrap.sh
./b2
./b2 install
7.下载新版的thrift,网址:http://thrift.apache.org,我下载的是thrift-0.11.0.tar.gz
tar -zxvf thrift-0.11..tar.gz
cd thrift-0.11.
./bootstrap.sh
./configure --with-lua=no
make
make install
8. 测试下thrift是否安装成功,使用thrift官网的例子
在/home/thrift_test目录下创建user.thrift文件,内容如下:
struct UserProfile {
: i32 uid,
: string name,
: string blurb
}
service UserStorage {
void store(: UserProfile user),
UserProfile retrieve(: i32 uid)
}
执行thrift --gen php user.thrift
在当前目录下生成一个目录gen-php,打开gen-php目录,有两个文件,如下
[root@MiWiFi-R3-srv thrift_test]# cd gen-php/
[root@MiWiFi-R3-srv gen-php]# ll
总用量
-rw-r--r--. root root 7月 : Types.php
-rw-r--r--. root root 7月 : UserStorage.php
到此,thrift安装成功
centos7安装thrift的更多相关文章
- CentOS7安装CDH 第六章:CDH的管理-CDH5.12
相关文章链接 CentOS7安装CDH 第一章:CentOS7系统安装 CentOS7安装CDH 第二章:CentOS7各个软件安装和启动 CentOS7安装CDH 第三章:CDH中的问题和解决方法 ...
- HP服务器 hp 360g5 centos7安装问题
HP服务器 hp 360g5 centos7安装问题 一 :启动盘无法识别硬盘 1.进入安装光盘,用上下键选择安装centos--Install Centos7(注意不可按Enter键),如图: 2 ...
- CentOS7 安装Mono及Jexus
CentOS7安装Mono及Juxes 1 安装Mono 1.1 安装yum-utils 因为安装要用到yum-config-manager,默认是没有安装的,所以要先安装yum-utils包.命令如 ...
- CentOS7安装mysql提示“No package mysql-server available.”
针对centos7安装mysql,提示"No package mysql-server available."错误,解决方法如下: Centos 7 comes with Mari ...
- CentOS7安装Oracle 11gR2 安装
概述 Oracle 在Linux和window上的安装不太一样,公司又是Linux系统上的Oracle,实在没辙,研究下Linux下Oracle的使用,oracle默认不支持CentOS系统安装,所以 ...
- Centos7安装完毕后重启提示Initial setup of CentOS Linux 7 (core)的解决方法
问题: CentOS7安装完毕,重新开机启动后显示: Initial setup of CentOS Linux 7 (core) 1) [x] Creat user 2) [!] License i ...
- 安装thrift
要求 thrift至少需要支持三种语言: Java PHP Go 预安装 基本教程: http://thrift.apache.org/docs/install/centos 使用最新的thrift, ...
- centos7安装eclipse
centos7安装eclipse Eclipse是一个集成开发环境(IDE),包含一个基工作区和定制环境的可扩展插件系统.大部分使用 Java 编写,Eclipse 可以用来开发应用程序.通过各种插件 ...
- CentOS7安装mongoDB数据库
CentOS7安装mongoDB数据库 时间:2015-03-03 16:45来源:blog.csdn.net 作者:进击的木偶 举报 点击:8795次 mongoDB是目前发展比较好的NOSQL数据 ...
随机推荐
- python的垃圾回收机制和析构函数__del__
析构函数__del__定义:在类里定义,如果不定义,Python 会在后台提供默认析构函数. 析构函数__del__调用: A.使用del 显式的调用析构函数删除对象时:del对象名: class F ...
- BZOJ 1036: [ZJOI2008]树的统计Count-树链剖分(点权)(单点更新、路径节点最值、路径求和)模板,超级认真写了注释啊啊啊
1036: [ZJOI2008]树的统计Count Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 23015 Solved: 9336[Submit ...
- (22)python 自动化
例子 from selenium import webdriver driver = webdriver.PhantomJS() driver.get("http://www.huhumh. ...
- Codeforces 868A Bark to Unlock【字符串+二维string输入输出+特判】
A. Bark to Unlock time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...
- Linux命令之last
last [-num | -n num] [-f file] [-t YYYYMMDDHHMMSS] [-R] [-adioxFw] [username..] [tty..] last作用是显示近期用 ...
- ( 转 ) 数据库BTree索引、Hash索引、Bitmap位图索引的优缺点
测试于:MySQL 5.5.25 当前测试的版本是Mysql 5.5.25只有BTree和Hash两种索引类型,默认为BTree.Oracle或其他类型数据库中会有Bitmap索引(位图索引),这里作 ...
- bzoj 2660: [Beijing wc2012]最多的方案
Time Limit: 5 Sec Memory Limit: 128 MB Submit: 617 Solved: 361[Submit][Status][ ...
- POJ 2082 Terrible Sets(单调栈)
[题目链接] http://poj.org/problem?id=2082 [题目大意] 给出一些长方形下段对其后横向排列得到的图形,现在给你他们的高度, 求里面包含的最大长方形的面积 [题解] 我们 ...
- 【贪心】【二维偏序】【权值分块】bzoj1691 [Usaco2007 Dec]挑剔的美食家
既然题目中的要求满足二维偏序,那么我们很自然地想到将所有东西(草和牛)都读进来之后,对一维(美味度)排序,然后在另一维(价值)中取当前最小的. 于是,Splay.mutiset.权值分块什么的都支持查 ...
- python3-开发面试题(python)6.24基础篇(3)
1.用一行代码实现数值交换: a = 1 b = 2 a,b=b,a 2.Python3和Python2中 int 和 long的区别? long整数类型被Python3废弃,统一使用int ...