1.安装erlang

首先需要安装

rpm -Uvh http://mirrors.ustc.edu.cn/fedora/epel/5/i386/epel-release-5-4.noarch.rpm

其次

yum install git

再次

下载erlang 源码包

./configure

make

make install

备注其中前两部是为了以后安装thrift支持做准备的

2.安装thrift

首先

sudo yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel  openssl-devel

其次下载thrift源码包

./configure   //注意观察支持的语言,我让它支持python \c++\erlang,视情况而定 

make

make install

3.欢迎你在可以进入多语言,并发,分布式环境!

正对thrift编译时的缺陷 可以在makfile时 加入

一种解决的办法:-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H

或者修改头文价

This will cause the preprocessor to include netinet/in.h in thrift/protocol/TPrototol.h, so the hton* declarations will be visible to the compiler.

TProtocol.h has the following lines which cause the compiler error when HAVE_NETINET_IN_H is not defined.
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif