在centos 6安装,操作步骤如下:
1、gcc和gcc-c++
系统有gcc,版本不要太老,至少3.4.6版本是不行的,我后来用的gcc是4.1.2
2、ruby(不知版本有啥要求,我用的1.8.5)
包括ruby和ruby-devel
3、python(不知版本有啥要求,我用的2.4.3)
包括python和python-devel
4、libevent(不知版本有啥要求,我用的1.4)
包括libevent和libevent-devel
注:如果忘了libevent-devel会导致返工的。。。
还有其它一些依赖,比如openssl-devel, bison, autoconf(>2.65版本), bzip2-devel, automake等,见后面的“遇到的问题及解决办法”
5、boost
它需要依赖gcc、g++(即gcc-c++)、openssl-devel、bzip2-devel
可以先查看一下机器上也许有boost了,比如可以用find / -name "*boost*"
wget http://nchc.dl.sourceforge.net/project/boost/boost/1.45.0/boost_1_45_0.tar.bz2
tar jxvf boost_1_45_0.tar.bz2
cd boost_1_45_0
./bootstrap.sh
./bjam install
装完要加环境变量
export BOOST_ROOT=/usr/local
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
这种方式改比较不靠谱,我就修改/etc/profile,加上这两行,然后source /etc/profile搞定的。
6、Trift(依赖yum install automake byacc libtool flex bison)
A、装Trift
wget http://mirror.bjtu.edu.cn/apache//thrift/0.7.0/thrift-0.7.0.tar.gz
tar zxvf thrift-0.7.0.tar.gz
cd thrift-0.7.0.tar.gz
./configure
make
make install
B、装fb303
cd contr…………………………………………………………………………