Project

General

Profile

Support #335

Updated by Daniel Curtis almost 11 years ago

While increasing availability of the web services provided, I have created a jail for compiling and installing Percona package, with . Once ssh access has been enabled, log in and install the percona client and server: 
 <pre> 
 ssh db.example.com 
 su  
 pkg install percona55-server percona55-client 
 </pre> 

 Once this is done resolve some dependencies for the Galera package: 
 <pre> 
 pkg install bash bison gcc48 libexecinfo lsof sudo rsync openssl boost-libs cmake flex libcheck scons autoconf automake gmake help2man libtool bzr subversion libevent 
 </pre> 

 Because /bin/bash is often used as interpreter for scripts, you should link bash to that path: 
 <pre> 
 sudo ln -s ../usr/local/bin/bash /bin/bash 
 </pre> 

 Galera is written with the modern version of C++ standard, Next create a source build directory and its code is not fully compatible with default g++ 4.2.1 compiler. You should have at least g++ 4.7, but g++ 4.8 is highly recommended. Also, you should specify version of libstdc++ library, which is used for program execution through LD_LIBRARY_PATH environment variable. You should assign build the following environment variables. percona galera package: 
 <pre> 
 LD_LIBRARY_PATH=/usr/local/lib/gcc48 
 CC=gcc48 
 CXX=g++48 
 export LD_LIBRARY_PATH CC CXX 
 </pre> 

 It is recommended to add them to your login shell script (@.shrc, .cshrc, .bashrc@).  

 Now, you can check out the latest Galera and wsrep-patched MySQL from LaunchPad and build them with a single script. I am building for Galera 2.x and MySQL-wsrep 5.5 with wsrep API v24: 
 <pre> 
 mkdir /usr/local/src 
 cd /usr/local/src 
 bzr co --lightweight https://code.launchpad.net/~codership/galera/2.x release_24.2.7 wget http://www.percona.com/redir/downloads/Percona-XtraDB-Cluster/LATEST/source/percona-xtradb-cluster-galera.tar.gz 
 bzr co --lightweight https://code.launchpad.net/~codership/codership-mysql/wsrep-5.5 -r tag:wsrep_24.8 wsrep_24.8 tar xzf percona-xtradb-cluster-galera.tar.gz 
 cd release_24.2.7 percona-xtradb-cluster-galera 
 scripts/build.sh -j 1 -c -p -r 24.2.7 scons 
 MYSQL_SRC=../wsrep_24.8 scripts/mysql/build.sh -j 1 -c -p -r 24.2.7 make 
 make install 
 </pre> 

 h2. Resources 

 http://www.codership.com/wiki/doku.php?id=compile_galera 

Back