[[email protected] ~]# rpm -ivh epel-release-6-8.noarch.rpm
[[email protected] ~]# yum install -y automake zlib autoconf cmake gcc libtool ncurses ncurses-devel readline readline-devel
[[email protected] ~]# yum install -y centos-release-scl
[[email protected] ~]# yum install -y devtoolset-4-gcc-c++ devtoolset-4-gcc
[[email protected] ~]# scl enable devtoolset-4 bash
[[email protected] ~]# git clone --recursive https://github.com/tencent-wechat/phxsql.git
[[email protected] ~]# cd phxsql
[[email protected] phxsql]# cd third_party/leveldb
[[email protected] leveldb]# make
[[email protected] leveldb]# mkdir lib
[[email protected] leveldb]# cd lib
[[email protected] lib]# ln -s ../out-static/libleveldb.a libleveldb.a
[[email protected] ~]# cd phxsql
[[email protected] phxsql]# cd third_party/protobuf
[[email protected] protobuf]# cp -r ../phxpaxos/third_party/gmock gmock
[[email protected] protobuf]# ./autogen.sh
[[email protected] protobuf]# ./configure CXXFLAGS=-fPIC --prefix=/root/phxsql/third_party/protobuf
[[email protected] protobuf]# make && make install
[[email protected] ~]# cd phxsql
[[email protected] phxsql]# cd third_party/glog
[[email protected] glog]# ./configure CXXFLAGS=-fPIC --prefix=/root/phxsql/third_party/glog
[[email protected] ~]# cd phxsql
[[email protected] phxsql]# cd third_party/colib
[[email protected] colib]# make
[[email protected] ~]# cd phxsql
[[email protected] phxsql]# cd third_party/phxpaxos/third_party
[[email protected] third_party]# rm -rf glog
[[email protected] third_party]# rm -rf leveldb
[[email protected] third_party]# rm -rf protobuf
[[email protected] third_party]# ln -s ../../glog glog
[[email protected] third_party]# ln -s ../../leveldb leveldb
[[email protected] third_party]# ln -s ../../protobuf protobuf
[[email protected] third_party]# cd ..
[[email protected] phxpaxos]# ./autoinstall.sh
[[email protected] phxpaxos]# make && make install
[[email protected] phxpaxos]# cd plugin/
[[email protected] plugin]# make && make install
[[email protected] ~]# cd phxsql
[[email protected] phxsql]# cd third_party/phxrpc
[[email protected] phxrpc]# mkdir third_party
[[email protected] phxrpc]# cd third_party/
[[email protected] third_party]# ln -s ../../protobuf protobuf
[[email protected] third_party]# cd ..
[[email protected] third_party]# make
[[email protected] ~]# cd phxsql
[[email protected] phxsql]# tar zxvf percona-server-5.6.31-77.0.tar.gz
[[email protected] phxsql]# mv percona-server-5.6.31-77.0 percona
[[email protected] phxsql]# ./autoinstall.sh
[[email protected] phxsql]# make && make install
[[email protected] phxsql]# make package
creating package phxsql-0.8.5.tar.gz...
[[email protected] phxsql]# ll -h phxsql-0.8.5.tar.gz
-rw-r--r-- 1 root root 55M Mar 1 12:52 phxsql-0.8.5.tar.gz
原文地址:http://blog.51cto.com/13598811/2074227