galera源碼安裝
---1.安裝galera依賴的主件
#echo "192.168.1.25 db00 db00.mysql.com" >>/etc/hosts
yum -y install cmake gcc gcc-c++ autoconf automake zlib* libxml* \
ncurses ncurses-devel libtool libtool-ltdl-devel* make bison bison-devel \
openssl-devel libevent-devel \
libaio libaio-devel pam-devel boost boost-devel valgrind-devel \
libnl-devel popt-devel popt-static bzr
----安裝依賴軟件包
yum -y install pcre-devel* boost-devel check-devel boost-* nmap-* \
nc-* openssl*
----安裝scons
# python --version
Python 2.6.6
rm -rf /soft/ && mkdir /soft/ && cd /soft
wget http://cznic.dl.sourceforge.net/project/scons/scons/2.3.5/scons-2.3.5.tar.gz
tar zxvf scons-2.3.5.tar.gz
cd scons-2.3.5
python2.6 setup.py install
----安裝新版python
# whereis python
python: /usr/bin/python2.6-config /usr/bin/python2.6 /usr/lib/python2.6 /usr/lib64/python2.6 /usr/include/python2.6 /usr/share/man/man1/python.1.gz
rm -rf /usr/bin/python
vi /usr/bin/yum
將#!/usr/bin/python
修改為
#!/usr/bin/python2.6
rm -rf /soft/ && mkdir /soft/ && cd /soft
tar xvzf Python-2.7.10.tgz
cd Python-2.7.10
./configure
make -j4
make install
#將新版python設置為默認
rm -rf /usr/bin/python
ln -s /usr/local/bin/python2.7 /usr/bin/python
python --version
結果確認:Python 2.7.10
---2.安裝galera
rm -rf /soft/ && mkdir /soft/ && cd /soft
tar xvzf galera-3-25.3.10.tar.gz
cd galera-3-25.3.10
scons
或
./scripts/build.sh
正確結果顯示:
scons: done building targets.
cp garb/garbd /data/mysql/bin
cp libgalera_smm.so /data/mysql/lib/plugin/
cp /soft/galera-3-25.3.10/scripts/mysql/mysql-galera /usr/local