Manually compile vitess in centos6, and compile vitess in centos6.
Vitess is an open-source mysql proxy for youtub. It is very convenient to compile in ubuntu, but there are many pitfalls in centos and google cannot be accessed. Recently, it was compiled manually based on the bootstrap. sh script, and posted the process for your reference.
Upgrade automakewget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/monkeyiq:/centos6updates/CentOS_CentOS-6/noarch/automake-1.13.4-3.2.noarch.rpmwget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/monkeyiq:/centos6updates/CentOS_CentOS-6/noarch/autoconf-2.69-12.2.noarch.rpm
Rpm-Uvh autoconf-2.69-12.2.noarch.rpm
Rpm-Uvh automake-1.13.4-3.2.noarch.rpm
Upgrade python to 2.7, references http://jingyan.baidu.com/article/da1091fb3fb589027849d6d7.htmlwget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
Upgrade python-setuptools root user to execute wget https://bootstrap.pypa.io/ez_setup.py-O-| python if installation fails manual installation steps are as follows wget https://pypi.python.org/packages/source/s/setuptools/setuptools-17.0.tar.gz#md5=fd15d24ed1e4c95e56d8c6e812f3a84ftar zxvf setuptools-17.0.tar.gz
Cd setuptools-17.0python ez_setup.py
Upgrade pip to 7.0.1 wget https://bootstrap.pypa.io/get-pip.py;python get-pip.py to install virtualenv13.0.1; pip install virtualenvln-s/usr/local/bin/python2.7/usr/bin/python2.7
------------------------------------------------------------- ../Dev. env
Install zookeeperrm-fr $ VTROOT/dist/vt-zookeeper-3.3.5
Cd $ VTTOP/third_party/zookeeper
Tar-xjf zookeeper-3.3.5.tbz
Mkdir-p $ VTROOT/dist/vt-zookeeper-3.3.5/libcp zookeeper-3.3.5/contrib/fatjar/zookeeper-3.3.5-fatjar.jar $ VTROOT/dist/vt-zookeeper-3.3.5/libcd zookeeper-3.3.5/src/c
./Configure -- prefix = $ VTROOT/dist/vt-zookeeper-3.3.5
Make-j3 install
Cd $ VTTOP/third_party/zookeeper
Rm-fr zookeeper-3.3.5
# Install protoc and proto python librariesprotobuf_dist = $ VTROOT/dist/protobuf
Rm-rf $ VTROOT/dist/protobufcd $ VTROOTmkdir-p $ VTROOT/dist/protobuf/lib/release/site-packagesexport PYTHONPATH = $ VTROOT/dist/protobuf/lib/python2.7/ site-packages: $ PYTHONPATH reference. /travis/install_protobuf.sh perform the following wget https://github.com/google/protobuf/archive/v3.0.0-alpha-1.tar.gztar zxvf v3.0.0-alpha-1.tar.gz cd $ VTROOT/protobuf-3.0.0-alpha-1 comes with a ladder, download and unzip gtest in $ VTROOT/protobuf-3.0.0-alpha-1 directory. /autogen. sh $ VTROOT/dist/protobuf
./Configure -- prefix = $ VTROOT/dist/protobuf
Cd python/
Python setup. py install
# Install gRPC C ++ base, so we can install the python adaptersgrpc_dist = $ VTROOT/dist/grpc
Rm-rf $ VTROOT/dist/grpc mkdir-p $ VTROOT/dist/grpc reference./travis/install_grpc.sh execute git clone https://github.com/grpc/grpc.gitcd grpc
Git submodule update -- init
Make install prefix = $ VTROOT/dist/grpc
Pip install-r src/python/requirements.txt-t $ VTROOT/dist/grpc/lib/python2.7/site-packagesCFLAGS =-I $ VTROOT/dist/grpc/include LDFLAGS =-L $ VTROOT/dist/grpc/lib pip install -- upgrade src/python/src-t $ VTROOT/dist/grpc/lib/python2.7/site-packages
Ln-nfs $ VTTOP/third_party/go/launchpad.net $ VTROOT/srcgo install launchpad.net/gozk/zookeeper
Go get-u github.com/golang/protobuf/protogo get-u github.com/golang/gloggo get-u-a github.com/golang/protobuf/protoc-gen-go
The following go package needs to be manually downloaded and compiled in the container, golang China provides the corresponding package download http://www.golangtc.com/download/packagego get-u golang.org/x/net/context
Go get-u golang.org/x/tools/#/goimports
Go get-u github.com/golang/lint/golintgo get-u github.com/tools/godep
Go get-u google.golang.org/grpc
Go get-u github.com/modocache/gover
Go get-u github.com/mattn/goverils
Ln-snf $ VTTOP/config $ VTROOT/configln-snf $ VTTOP/data $ VTROOT/data1-snf $ VTTOP/py $ VTROOT/py-vtdbln-snf $ VTTOP/go/ zk/zkctl/zksrv. sh $ VTROOT/bin/zksrv. shln-snf $ VTTOP/test/vthook-test.sh $ VTROOT/vthook/test. sh
Echo "$ MYSQL_FLAVOR"> $ VTROOT/dist/MYSQL_FLAVOR
Cp $ VTTOP/config/gomysql. pc. tmpl $ VTROOT/lib/gomysql. pcecho "Version:" "$ ($ VT_MYSQL_ROOT/bin/mysql_config -- version)"> $ VTROOT/lib/gomysql. pcecho "Cflags:" "$ ($ VT_MYSQL_ROOT/bin/mysql_config -- cflags)-ggdb-fPIC" >>$ VTROOT/lib/gomysql. pcecho "Libs:" "$ ($ VT_MYSQL_ROOT/bin/mysql_config -- libs_r)"> $ VTROOT/lib/gomysql. pc
# Install bsoncd $ VTTOP/third_party/py/bson-0.3.2
Python./setup. py install -- prefix = $ VTROOT/dist/py-vt-bson-0.3.2
Rm-r build
# Install cbson
Cd $ VTTOP/py/cbson
Python./setup. py install -- prefix = $ VTROOT/dist/py-cbson
# Create pre-commit hooksln-sf $ VTTOP/misc/git/pre-commit $ VTTOP/. git/hooks/pre-commit