环境:Vmware Workstation 10,CentOS-7-x86_64-DVD-1511.iso,Xshell 4.0,ip:192.168.216.140.
[root@localhost ~]# yum install autoconf automake bison boost gcc gcc-c++ libevent-devel openssl-devel zlib-devel python-devel
[root@localhost ~]# wget http://mirrors.tuna.tsinghua.edu.cn/apache/thrift/0.10.0/thrift-0.10.0.tar.gz
[root@localhost ~]# tar -zxvf thrift-0.10.0.tar.gz -C /usr/local/
[root@localhost ~]# mv /usr/local/thrift-0.10.0/ /usr/local/thrift && cd /usr/local/thrift
[root@localhost thrift]# ./configure
[root@localhost thrift]# make
[root@localhost thrift]# make install
[root@localhost thrift]# cd
[root@localhost ~]# thrift -gen java /usr/local/thrift/tutorial/shared.thrift
[root@localhost ~]# ll ~/gen-java/shared/
总用量 52
-rw-r–r–. 1 root root 34891 6月 13 17:46 SharedService.java
-rw-r–r–. 1 root root 14781 6月 13 17:46 SharedStruct.java