Home > MySQL Cluster 5.1 Carrier Grade Editionをセットアップする-1/2

MySQL Cluster 5.1 Carrier Grade Editionをセットアップする-1/2

  • March 6, 2008 7:03 PM

ソースファイルの準備

BitKeeperツリーからダウンロード

/usr/local/bk-client2.0/bkf clone bk://mysql.bkbits.net/mysql-5.1-telco mysql-5.1-telco

ビルドの準備

詳解 MySQLを手順を参考に。

1. BUID/compile-pentium-debugをコピーしてBUID/compile-hirohamaへ

2. compile-hirohamaを開く

3. extra_flags="-g $debug_cflags"

4. extra_configs=.の行を削除

5. extra_configs=""を. "$path/FINISH.sh"の前に追加

6. 保存

すると、こんな感じになる。

BUILD@macbook$ cat compile-hirohama #! /bin/sh

path=`dirname $0`
set -- "$@" --with-debug=full
. "$path/SETUP.sh"

extra_flags="-g $debug_cflags"

extra_configs=""

. "$path/FINISH.sh"

ここで、さらにextra_configsを修正する。

extra_configs="$pentium_configs $debug_configs $max_configs $error_inject --with-experimental-collations prefix=/usr/local/mysql-5.1-telco --localstatedir=/Users/hirohama/data/data10 --libexecdir=/usr/local/mysql-5.1-telco/bin --with-comment='MySQL Cluster CGE' --enable-thread-safe-client --enable-local-infile --with-pic --with-client-ldflags=-static --with-mysqld-ldflags=-static --with-zlib-dir=bundled --with-big-tables --with-ssl --with-readline --with-embedded-server --with-archive-storage-engine --with-blackhole-storage-engine --with-ndbcluster --with-csv-storage-engine --with-example-storage-engine --with-federated-storage-engine --with-partition --with-innodb --with-extra-charsets=all"

BUILD/compile-hirohamaを実行。20〜30分ほど待つ。

インストール

sudo make testとか、sudo make installで、再度ちょっと待つ。

mysql_install_dbはbinディレクトリに展開されているでの、これを使って権限テーブルをセットアップする。

ちなみに、make installの代わりに、ここで./scripts/make_binary_distributionスクリプトを実行すると、(mysql.comで配布されているように)tar.gzで固めてソース直下に配置してくれるらしい。
また、make_binary_distribution実行時は、--no-stripオプションつきがお勧めらしい。

設定

/etc/my.cnfにInstance Manager用の項目を追加する

[mysqld10] nonguarded socket=/tmp/mysql10.sock pid-file=/tmp/mysql10.pid datadir=/Users/hirohama/data/data10 basedir=/usr/local/mysql-5.1-telco mysqld-path=/usr/local/mysql-5.1-telco/bin/mysqld expire_logs_days=5

port=3315
server-id=20
log-bin=/Users/hirohama/data/data10/10
log=/Users/hirohama/data/data10/10.log

MySQL Instance Managerで起動した後で、MySQLクライアントでアクセスできることを確認する。

MySQL Clusterのセットアップ

/etc/my.cnfの該当セクションに以下を追加する。

ndbcluster
log-bin
binlog-format=row

[mysql_cluster]
ndb-connectstring=localhost

[ndb_mgmd]
config-file=/Users/hirohama/data/ndb/config.ini

/Users/hirohama/data/ndb/config.iniを作成

[NDBD DEFAULT] NoOfReplicas= 1 DataDir= /Users/hirohama/data/ndb

[NDB_MGMD]
Hostname= localhost

[NDBD]
HostName= localhost

[MYSQLD]
[MYSQLD]

関連エントリー

Home > MySQL Cluster 5.1 Carrier Grade Editionをセットアップする-1/2

Search
Feeds

Return to page top