CentOS下编译TFS笔记

svn checkout http://code.taobao.org/svn/tb-common-utils/trunk/tb-common-utils

svn checkout http://code.taobao.org/svn/tfs/tags/release-2.2.8

yum install -y gcc-c++
yum install -y libuuid-devel zlib-devel mysql-devel     //一些基本库
yum install -y e4fsprogs e4fsprogs-devel     //ext4
yum install -y readline-devel
yum install -y libtool

 首先编译安装tblib(tb-common-utils),里面含有tbsys和tbnet,tfs依赖这二个库,这里我安装在和tfs同一个路径。就几个命令。

export TBLIB_ROOT=/usr/local/tblib
chmod 777 build.sh
./build.sh

 64bit机器,需要安装libunwind 

wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.0.tar.gz
tar zxf libunwind-1.0.tar.gz
cd libunwind-1.0
autoreconf -i -f
./configure
makemake install

安装google-perftools

 

wget http://gperftools.googlecode.com/files/google-perftools-1.9.1.tar.gz
tar zxf google-perftools-1.9.1.tar.gz
cd google-perftools-1.9.1
./configure --enable-frame-pointers
make
make install

 

编译 TFS

修改session_util.h,添加stdint.h头文件
修改meta_server_service.cpp,在1584行
char* pos =(char*)strstr(sub_dir, parents_dir);
 
./build.sh init
./configure --prefix=/usr/local/tfs --with-tblib-root=/usr/local/tblib
find ./ -name  Makefile | xargs sed -i 's/-Werror//'
make
make install

 开放防火墙端口

28100//nameserver

28200//dataserver

 

 

posted @ 2012-10-22 09:30  eprsoft  阅读(479)  评论(0编辑  收藏  举报