Transactd Build Guide for Unix

1. Prepare the environment

Transactd Plugin and clients can be built with GCC on Unix (64bit). In this page, we use the following environments for example:

GCC ver 4.4 or later is required. Also, you can build CentOS(GCC4.4 or later or clang LLVM 3.4) and Mac OS X 10.9(GCC4.4 or later or Xcode5.1 LLVM 3.4) in the same way.

2. Install CMake

Install CMake with command like following:

sudo aptitude install cmake

In CentOS:

sudo yum install cmake

On Mac OS X, Install binary distribution and add /Applications/Cmake.app/Contents/bin to the path.

3. Download and build Boost C++ Libraries

Download source code from Boost download page and extract it.

cd ~
wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download -O boost_1_55_0.tar.gz
tar xzf boost_1_55_0.tar.gz

Run the following commands to build Boost:

cd ~/boost_1_55_0
./bootstrap.sh --with-libraries=chrono,filesystem,system,thread,timer,serialization,program_options
./b2 cxxflags=-fPIC

4. Build both of the Plugin and clients

Please skip this step if you want to build only the clients.

4-1 Download MySQL source code

Download source code from MySQL Community Server download page and extract it.

cd ~
wget http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.20.tar.gz
tar xzf mysql-5.6.20.tar.gz

4-2 Download Transactd Plugin source code

Download source code from Transactd Download page.

Extract it into the plugin directory in the MySQL source code directory.

cd ~
wget http://www.bizstation.jp/al/transactd/download/transactd-3.5.0/transactd-source-3.5.0.zip
#On Mac OS X
#curl -O http://www.bizstation.jp/al/transactd/download/transactd-3.5.0/transactd-source-3.5.0.zip
unzip -q transactd-source-3.5.0.zip -d transactd
mv transactd ~/mysql-5.6.20/plugin/

4-3 Run CMake

Run the following commands. Please note options which will be described later.

cd ~/mysql-5.6.20
mkdir bldgccx64
cd bldgccx64
cmake .. -DWITH_TRANSACTD_SERVER=ON -DWITH_TRANSACTD_CLIENTS=ON \
  -DBUILD_CONFIG=mysql_release \
  -DBOOST_ROOT=~/boost_1_55_0 \
  -DCMAKE_INSTALL_PREFIX=/usr/local/mysql-5.6.20 \
  -DTRANSACTD_CLIENTS_PREFIX=/usr/lib \
  -DTRANSACTD_PREFIX=/usr/local/transactd

4-4 Build

Then, there is a Makefile. Run make command to build and install.

make
make install

5. Build clients

5-1 Download Transactd source code

Download source code from Transactd Download page.

cd ~
wget http://www.bizstation.jp/al/transactd/download/transactd-3.5.0/transactd-source-3.5.0.zip
#On Mac OS X
#curl curl -O http://www.bizstation.jp/al/transactd/download/transactd-3.5.0/transactd-source-3.5.0.zip
unzip -q transactd-source-3.5.0.zip -d transactd

5-2 Run CMake

Run the following commands. Please note options which will be described later.

cd ~/transactd
mkdir bldgccx64
cd bldgccx64
cmake .. -DWITH_TRANSACTD_SERVER=OFF -DWITH_TRANSACTD_CLIENTS=ON \
  -DBOOST_ROOT=~/boost_1_55_0 \
  -DTRANSACTD_CLIENTS_PREFIX=/usr/lib \
  -DTRANSACTD_PREFIX=/usr/local/transactd

5-3 Build

Then, there is a Makefile. Run make command to build and install.

make
make install