레이블이 fb303인 게시물을 표시합니다. 모든 게시물 표시
레이블이 fb303인 게시물을 표시합니다. 모든 게시물 표시

2011년 8월 4일 목요일

thrift 0.6.1 소스 설치 방법

libevent, boost 최신 버젼으로 설치하지 않고 패키지로 설치할 경우는
3.1.2 부터 따라 하시면 될꺼 같습니다.

1. libevent lib 설치
- 소스다운
- cd $libevent_source
- ./configure
- make && sudo make install

2. boost lib 소스 설치
- 최신 소스다운 ( 설치한 소스는 boost 1.47)
- cd $boost_source
-./boostrap.sh
-./b2
-./b2 install

3. thrift 설치
- 소스 다운(0.6.1 설치했음)
3.1 설치전에 필요한 파일들
3.1.1  libevent, boost lib 소스로 설치했을 경우

sudo apt-get install automake libtool flex bison pkg-config g++
3.1.2 libevent, boost lib 패키지로 설치할 경우

sudo apt-get install libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++
3.2 설치시작
./configure
make && sudo make install

- 추가적으로 python lib 설치시
cd ./lib/py
sudo python setup.py install

4. fb303 설치
cd $thrift_source/contrib/fb303
./configure
make && sudo make install

- fbstatus 에러 발생시
cd ./cpp/gen-cpp
fb303_type.cpp 에서

_kfb_statusValues 부분을 아래와 같이 수정
int _kfb_statusValues[] = {
0,
1,
2,
3,
4,
5
}

- python lib 설치
cd $thrift_source/contrib/fb303/py
sudo python setup.py install