hypertable编译安装

环境:
操作系统:Red Hat Enterprise Linux Server release 5.4 (Tikanga)   (cat /etc/redhat-release)
系统信息:#1 SMP Tue Aug 18 15:51:48 EDT  2009 x86_64 x86_64 x86_64 GNU/Linux   (uname -a)
gcc/g++: gcc /g++版本 4.1.2 20080704 (Red Hat 4.1.2-46),   (gcc -v / g++ -v)
python: Python 2.4.3    (python -V)
 
参考:
1. hypertable HowToBuild: https://code.google.com/p/hypertable/wiki/HowToBuild ,这里使用CentOS_5.2_64-bit
 
安装:
1. hypertable源码下载
$ git clone git://github.com/hypertable/hypertable.git
 
2. 根据readme安装依赖
(#  yum install gcc-c++ make cmake python-devel bzip2-devel zlib-devel expat-devel rrdtool rrdtool-devel ruby ruby-devel ruby-ext)
安装cmake:
# yum install cmake
 
安装boost:
wget http : //downloads.sourceforge.net/boost/boost_1_44_0.tar.bz2
tar xjvf boost_1_44_0.tar.bz2
cd boost_1_44_0
./bootstrap.sh --with-libraries=filesystem,iostreams,program_options,system,thread,graph,regex
./bjam install
 
安装log4cpp :
#tar zxvf log4cpp-1.1.tar.gz
#cd log4cpp
# ./configure && make -j16 && make check && make install
 
安装hyperic-sigar:
$unzip hyperic-sigar-1.6.4.zip
#cp hyperic-sigar-1.6.4/sigar-bin/include/*.h /usr/local/include
#cp hyperic-sigar-1.6.4/sigar-bin/lib/libsigar-amd64-linux.so /usr/local/lib
 
安装 BerkeleyDB:
tar -xzvf db-4.8.26.tar.gz
cd db-4.8.26/build_unix/
../dist/configure --enable-cxx
#make -j 32 && make install
 
安装re2
tar -zxvf re2.tgz
cd re2
make -16 && make test -j16 && make install && make testinstall
 
安装snappy:
tar -zxvf snappy-1.0.4.tar.gz
cd snappy-1.0.4
./configure  && make -j16 && make install
 
安装cronolog :
tar xzvf cronolog-1.6.2.tar.gz
cd cronolog-1.6.2/
#./configure && make -j16 && make install
 
安装libedit-devel:
tar zxvf libedit-20121213-3.0.tar.gz
cd libedit-20121213-3.0
./configure --enable-widec
# make -j16&& make check&&make install
 
安装ceph:
tar xzvf ceph-0.22.2.tar.gz
cd ceph-0.22.2
# ./configure  &&make -j16  && make install
 
安装libevent:
#yum install libevent libevent-devel
 
安装libunwind:
tar zxvf libunwind-1.1.tar.gz
cd libunwind-1.1
./configure && make -j16&& make install
 
安装 tcmalloc :
tar zxvf gperftools-2.0.tar.gz
cd gperftools-2.0
./configure && make -j16&& make install
 
安装thrift Broker :
tar zxvf thrift-0.8.0.tar.gz
./configure && make -j16 && make install && /sbin/ldconfig
 
安装kfs:
tar zxvf kfs-0.5.tar.gz
 
设置库链接:
#sh -c "echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf"
#sh -c "echo '/usr/local/BerkeleyDB.4.8/lib' > /etc/ld.so.conf.d/BerkeleyDB.4.8.conf"
#/sbin/ldconfig
 
cd /usr/lib64/
ln -s libpangocairo-1.0.so.0.2800.1 libpangocairo.so
ln -s libpango-1.0.so.0.2800.1 libpango.so
ln -s libpangoft2-1.0.so.0.2800.1 libpangoft2.so
 
cd /lib64
ln -s libgobject-2.0.so.0.2200.5 libgobject.so
ln -s libglib-2.0.so.0.2200.5 libglib.so
ln -s libgmodule-2.0.so.0.2200.5 libgmodule.so
 
3. 编译安装
设置编译目录:
mkdir -p ~/build/hypertable
cd ~/build/hypertable
 
配置命令:
cmake ~/src/hypertable
 
编译:
# make
 
安装:
# make install
 
注:
1. boost库的删除:
# rm -rvf /usr/local/include/boost/
# cd /usr/local/lib
# ls | grep boost | xargs rm -vf
 
2.设置python的默认版本
#which python        (了解python的路径)
我们的系统给出的是/usr/local/bin/python,同时安装了python2.4, python2.7
#ln -f /usr/bin/python2.4 /usr/local/bin/python
 
3.修改cmake查找依赖包方式和顺序
如这里的python。
源码中hypertable/cmake/下是这些文件
修改hypertable/cmake/FindPython.cmake
    find_path(PYTHON_INCLUDE_DIR Python.h NO_DEFAULT_PATH PATHS
            ${HT_DEPENDENCY_INCLUDE_DIR}
            /usr/include/python${PYTHON_VERSION}
            /usr/include/python
            /opt/local/include/python${PYTHON_VERSION}
            /opt/local/include/python
            /usr/local/include/python${PYTHON_VERSION}
            /usr/local/include/python
            )
 
  find_library(PYTHON_LIBRARY python${PYTHON_VERSION} NO_DEFAULT_PATH PATHS               ${HT_DEPENDENCY_LIB_DIR}
               /usr/lib
               /opt/local/lib
               /usr/local/lib
               )
 
4.
 
 




你可能感兴趣的:(table)