サーバ2台でndb_mgmd, ndbd, mysqlを動かした際のメモ
sv1 sv2
+----------+ +----------+
| ndb_mgmd | | ndb_mgmd |
| ndbd | | ndbd |
| mysql | | mysql |
+----------+ +----------+
*****************************************************
// sv1, sv2共通
# vi /var/lib/mysql-cluster/config.ini
-----------------------------------------------------
# Example Ndbcluster storage engine config file.
#
[ndbd default]
NoOfReplicas= 2
ServerPort = 63132
MaxNoOfConcurrentOperations= 10000
# DataMemory= 1G
# IndexMemory= 64M
TimeBetweenWatchDogCheck= 30000
DataDir= /var/lib/mysql-cluster
MaxNoOfOrderedIndexes= 512
[ndb_mgmd default]
DataDir= /var/lib/mysql-cluster
[ndb_mgmd]
Id = 1
HostName = sv1.kickitout.net
[ndb_mgmd]
Id = 2
HostName = sv2.kickitout.net
[ndbd]
Id = 11
HostName = sv1.kickitout.net
[ndbd]
Id = 12
HostName = sv2.kickitout.net
[mysqld]
Id = 21
HostName = sv1.kickitout.net
[mysqld]
Id = 22
HostName = sv2.kickitout.net
# choose an unused port number
# in this configuration 63132, 63133, and 63134
# will be used
[tcp default]
PortNumber= 63132
-----------------------------------------------------
// sv1 抜粋
# vi /etc/my.cnf
-----------------------------------------------------
[mysql_cluster]
ndb-connectstring = sv1.kickitout.net
[mysqld]
ndbcluster
ndb-connectstring = sv1.kickitout.net
[ndb_mgmd]
config_file=/var/lib/mysql-cluster/config.ini
-----------------------------------------------------
// sv2 抜粋
# vi /etc/my.cnf
-----------------------------------------------------
[mysql_cluster]
ndb-connectstring = sv2.kickitout.net
[mysqld]
ndbcluster
ndb-connectstring = sv2.kickitout.net
[ndb_mgmd]
config_file=/var/lib/mysql-cluster/config.ini
-----------------------------------------------------
*****************************************************
あとはiptablesで該当ポート1186,63132を開けておく
(忘れていてこれにはまった)
起動はndb_mgmd(sv1,sv2) -> ndbd(sv1,sv2) -> mysql(sv1,sv2)で順に行う
2011年12月27日火曜日
2011年12月14日水曜日
jsvcメモ
jsvcを必要とする機会があったのでその際のインストールメモ
//最初にopenjdkを準備
# yum install java-1.6.0-openjdk.x86_64 java-1.6.0-openjdk-devel.x86_64
$ wget http://ftp.riken.jp/net/apache//commons/daemon/source/commons-daemon-1.0.8-src.tar.gz
$ tar xzf commons-daemon-1.0.8-src.tar.gz
$ cd commons-daemon-1.0.8-src/src/native/unix/
//configure作成(既にあるけど)
$ ./support/buildconf.sh
//configure
$ CC=gcc44 CXX=g++44 \
CFLAGS="-march=native -O3 -m64 -pipe -fomit-frame-pointer -mmmx -mfpmath=sse -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2" \
CXXFLAGS="-march=native -O3 -m64 -pipe -fomit-frame-pointer -mmmx -mfpmath=sse -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2" \
./configure \
--host=x86_64-redhat-linux-gnu \
--build=x86_64-redhat-linux-gnu \
--target=x86_64-redhat-linux \
--program-prefix= \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--includedir=/usr/include \
--libdir=/usr/lib64 \
--libexecdir=/usr/libexec \
--localstatedir=/var \
--sharedstatedir=/usr/com \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--cache-file=./config.cache \
--with-libdir=lib64 \
--with-java=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/
$ make -j4
//同じ場所にjsvcが作成されるので利用する
//最初にopenjdkを準備
# yum install java-1.6.0-openjdk.x86_64 java-1.6.0-openjdk-devel.x86_64
$ wget http://ftp.riken.jp/net/apache//commons/daemon/source/commons-daemon-1.0.8-src.tar.gz
$ tar xzf commons-daemon-1.0.8-src.tar.gz
$ cd commons-daemon-1.0.8-src/src/native/unix/
//configure作成(既にあるけど)
$ ./support/buildconf.sh
//configure
$ CC=gcc44 CXX=g++44 \
CFLAGS="-march=native -O3 -m64 -pipe -fomit-frame-pointer -mmmx -mfpmath=sse -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2" \
CXXFLAGS="-march=native -O3 -m64 -pipe -fomit-frame-pointer -mmmx -mfpmath=sse -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2" \
./configure \
--host=x86_64-redhat-linux-gnu \
--build=x86_64-redhat-linux-gnu \
--target=x86_64-redhat-linux \
--program-prefix= \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--includedir=/usr/include \
--libdir=/usr/lib64 \
--libexecdir=/usr/libexec \
--localstatedir=/var \
--sharedstatedir=/usr/com \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--cache-file=./config.cache \
--with-libdir=lib64 \
--with-java=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/
$ make -j4
//同じ場所にjsvcが作成されるので利用する
登録:
投稿
(
Atom
)