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  

你可能感兴趣的:(mariadb)