mysql 4.1.16-gamma インストール (Solaris 9編)

インストール

   # groupadd -g 500 mysql
   # useradd -u 500 -g mysql mysql

   % ./configure --prefix=/usr/local/mysql --with-innodb --with-berkeley-db --with-embedded-server --enable-thread-safe-client --with-openssl --with-vio --with-raid --with-ndbcluster --with-extra-charsets=all --with-charset=ujis
   config.hの
    #define HAVE_VIS_H 1
   をコメントアウト

   isam/Makefileとmyisam/Makefileの中の
    CCLD = $(CC)
   を
    CCLD = $(CPP)
   に書き換える。

   % gmake

    ld: fatal: recording name conflict
   でndbdのリンクに失敗するので、
   ndb/src/common/libcommon.laとmgmcommon/libmgmsrvcommon.laとutil/libgeneral.laとtransporter/libtransporter.laとportlib/libportlib.laとlogger/liblogger.laとdebuger/libtrace.laとdebugger/signaldata/libsignaldataprint.laとmgmapi/libmgmapi.laとndbapi/libndpali.la
   のdependency_libs=〜〜をコメントアウト

   % gmake
   % gmake test

   エラーが出るけど無視

   # gmake install

NDB Cluster MGMTサーバ(192.168.0.2)の設定

ディレクトリの作成

# mkdir /opt/local/mysql_cluster
# mkdir /opt/local/mysql_cluster/ndb_mgmt

Ndb.cfgファイルの作成 ( /opt/local/mysql_cluster/ndb_mgmt/Ndb.cfg )

host=192.168.0.2:2200;nodeid=1

config.initファイルの作成 ( /opt/local/mysql_cluster/ndb_mgmt/config.ini )

[COMPUTER]
Id:1
HostName: 192.168.0.2

[COMPUTER]
Id:2
HostName: 192.168.0.3

[COMPUTER]
Id:3
HostName: 192.168.0.4

[MGM]
Id:1
ExecuteOnComputer: 1

[DB DEFAULT]
NoOfReplicas: 2

[DB]
Id:2
ExecuteOnComputer: 2
FileSystemPath: /opt/local/mysql_cluster/ndb_fs

[DB]
Id:3
ExecuteOnComputer: 3
FileSystemPath: /opt/local/mysql_cluster/ndb_fs

[API]
Id:4
ExecuteOnComputer: 2

[API]
Id:5
ExecuteOnComputer: 3

[TCP]
NodeId1:1
NodeId2:2

[TCP]
NodeId1:1
NodeId2:3

[TCP]
NodeId1:2
NodeId2:4

[TCP]
NodeId1:2
NodeId2:5

[TCP]
NodeId1: 3
NodeId2: 4

[TCP]
NodeId1: 3
NodeId2: 5

NDB Cluster DBノード2(192.168.0.3)の設定

ディレクトリの作成

# mkdir /opt/local/mysql_cluster
# mkdir /opt/local/mysql_cluster/ndb_db
# mkdir /opt/local/mysql_cluster/ndb_fs

Ndb.cfgファイルの作成 ( /opt/local/mysql_cluster/ndb_db/Ndb.cfg )

host=192.168.0.2:2200;nodeid=2

NDB Cluster DBノード3(192.168.0.4)の設定

ディレクトリの作成

# mkdir /opt/local/mysql_cluster
# mkdir /opt/local/mysql_cluster/ndb_db
# mkdir /opt/local/mysql_cluster/ndb_fs

Ndb.cfgファイルの作成 ( /opt/local/mysql_cluster/ndb_db/Ndb.cfg )

host=192.168.0.2:2200;nodeid=3

NDB Cluster APIノード4(192.168.0.2)の設定

ディレクトリの作成

# mkdir /opt/local/mysql_cluster/ndb_api

Ndb.cfgファイルの作成 ( /opt/local/mysql_cluster/ndb_api/Ndb.cfg )

host=192.168.0.2:2200;nodeid=4

my.cnfファイルの作成 ( /etc/my.cnf )

[mysqld]
datadir=/opt/local/mysql_cluster/ndb_api
ndbcluster
default-table-type = ndbcluster

NDB Cluster APIノード5(192.168.0.3)の設定

ディレクトリの作成

# mkdir /opt/local/mysql_cluster/ndb_api

Ndb.cfgファイルの作成 ( /opt/local/mysql_cluster/ndb_api/Ndb.cfg )

host=192.168.0.2:2200;nodeid=5

my.cnfファイルの作成 ( /etc/my.cnf )

[mysqld]
datadir=/opt/local/mysql_cluster/ndb_api
ndbcluster
default-table-type = ndbcluster