참고 : https://www.percona.com/doc/percona-tokumx/installation_from_packages.html#rhel-centos

#tokumx install
yum install https://www.percona.com/redir/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm
yum install tokumx-enterprise


#디렉토리 생성
mkdir -p /data/mongo/arbiter
mkdir -p /data/mongo/repl_0


#huge 설정
echo never > /sys/kernel/mm/transparent_hugepage/enabled


* 메모리는 8g, replica로 fail-over 셋팅예제

start.sh
#!/bin/sh
/usr/bin/mongod --replSet repl_set --dbpath /data/mongo/repl_0 --fork --logpath /var/log/tokumx/repl_0.mongod --expireOplogDays 3 --cacheSize 8g --quiet --maxConns 20000


start_arbiter.sh
#!/bin/sh
/usr/bin/mongod --replSet repl_set --dbpath /data/mongo/arbiter --fork --logpath /var/log/tokumx/repl_arbiter.mongod --expireOplogDays 1 --oplogSize 1 --port 37017 --noprealloc


start_standalone.sh(필요시)
#!/bin/sh
/usr/bin/mongod --dbpath /data/mongo/repl_0 --fork --logpath /var/log/tokumx/repl_0.mongod --expireOplogDays 3 --cacheSize 8g --quiet --maxConns 20000


replica 설정
mongo 커맨드 실행 후 아래 입력(각 노드는 가능하면 다른 장비에 설치되어야 fail over에 안정적임)

config = {
           _id: "repl_set",
           members: [
                      {_id: 0,host: "Primary IP입력:27017"},
                      {_id: 1,host: "Secondary IP입력:27017"},
                      {_id: 2,host: "Arbiter IP입력:37017",arbiterOnly:true},
                    ]
         }

rs.initiate(config);



+ Recent posts