MariaDB10.0.11ソースをダウンロード
ビルド関係のページを参考に以下の一群をinstall
https://mariadb.com/kb/en/build-environment-setup-for-linux/
https://mariadb.com/kb/en/building-mariadb-on-ubuntu/
installしたもの一覧
build-essential dpkg-dev devscripts hardening-wrapper autoconf automake1.9 autotools-dev binutils bison chrpath debhelper doxygen dpatch fakeroot fontconfig-config g++ gawk gcc gettext ghostscript ghostscript-x gsfonts html2text intltool-debian libc6-dev libcroco3 libcups2 libcupsimage2 libfontconfig1 libfontenc1 libfreetype6 libgomp1 libice6 libjpeg62 libltdl7 libltdl-dev libmail-sendmail-perl libncurses5-dev libpaper-utils libpaper1 libpng12-0 libreadline-dev libsm6 libsys-hostname-long-perl libtool libwrap0-dev libxaw7 libxfont1 libxmu6 libxpm4 libxt6 linux-libc-dev lmodern m4 make patchutils po-debconf tex-common texlive-base texlive-binaries texlive-latex-base texlive-latex-base-doc ttf-dejavu ttf-dejavu-core ttf-dejavu-extra xfonts-encodings xfonts-utils zlib1g-dev libssl-dev
コンパイル
オプションは適当に指定
cmake . -DCMAKE_INSTALL_PREFIX=/path_to_your_installation_dir/mariadb \
-DMYSQL_DATADIR=/path_to_your_installation_dir/data \
-DMYSQL_UNIX_ADDR=/path_to_your_installation_dir/mariadb.sock \
-DINSTALL_SYSCONFDIR=/path_to_your_installation_dir/etc \
-DENABLED_LOCAL_INFILE=1 \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS=all \
-DWITH_INNOBASE_STORAGE_ENGINE=1
失敗したらCMakeCache.txtを削除して再度cmakeを行う
make
make test
make install
インストール後
DBの初期化
cd /path_to_your_installation_dir/mariadb
./scripts/mysql_install_db --basedir=/path_to_your_installation_dir/mariadb --datadir=/path_to_your_installation_dir/mariadb_data --defaults-file=/path_to_your_installation_dir/etc/my.cnf --user=user_name
サンプルのmy.cnfを適当にコピー
cp ./support-files/my-huge.cnf /path_to_your_installation_dir/etc/my.cnf
my.cnfを適当に編集した後、起動
/path_to_your_installation_dir/mariadb/bin/mysqld_safe &
アクセス
/path_to_your_installation_dir/mariadb/bin/mysql -uroot
終了
sudo /path_to_your_installation_dir/mariadb/bin/mysqladmin shutdown
以上