2017년 8월 8일 화요일

Greenplum 설치




# root 계정으로 실행
$ gpadmin 에서 수행
Node : all (마스터노드, 스탠바이마스터 노드, 세그먼트 노드 모두)
            mdw : 마스터 노드에서 수행


작업 구분
Task
Commands
node
비고
시스템 구성시스템 환경  구성Master Node : mdw Standby Master Node: smdw
Segment Node: sdw1 ~ sdw3


Host 구성
172.16.150.130 mdw mdw.gphd.local 172.16.150.131 smdw smdw.gphd.local
172.16.150.143 sdw1 sdw1.gphd.local
172.16.150.154 sdw2 sdw2.gphd.local
172.16.150.156 sdw3 sdw3.gphd.local

 
 세그먼트 노드는 최소 4개 구성을 권고 (설치환경은 메모리 부족으로 3개 노드로 구성)
OS 설정방화벽 설정 제거# vi /etc/selinux/config SELINUX=disabled  ## 수정 # chkconfig iptables off
# service iptables stop
# service iptables status
# chkconfig --list iptables
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
all 
호스트 설정# vi /etc/hosts
172.16.150.130 mdw mdw.gphd.local
172.16.150.131 smdw smdw.gphd.local
172.16.150.143 sdw1 sdw1.gphd.local
172.16.150.154 sdw2 sdw2.gphd.local
172.16.150.156 sdw3 sdw3.gphd.local
all모든 노드에 동일한 hosts 로 Copy
/etc/sysctl.conf# vi /etc/sysctl.conf
kernel.shmmax = 500000000
kernel.shmmni = 4096
kernel.shmall = 4000000000
kernel.sem = 250 512000 100 2048
kernel.sysrq = 1
kernel.core_uses_pid = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.msgmni = 2048
net.ipv4.tcp_syncookies = 1
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.conf.all.arp_filter = 1
net.ipv4.ip_local_port_range = 10000 65535
net.core.netdev_max_backlog = 10000
net.core.rmem_max = 2097152
net.core.wmem_max = 2097152
vm.overcommit_memory = 2
all모든 노드에 동일한 sysctl.conf 로 설정
/etc/security/limits.conf# vi /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
all 
/etc/security/limits.d/90-nproc.conf# vi /etc/security/limits.d/90-nproc.conf
* soft nproc 131072
* hard nproc 131072
  
reboot# sync # rebootall 
GPDB 설치GPDB Binary 설치# mkdir -p /data/setup # 파일 복사
# unzip greenplum-db-4.3.15.0-rhel5-x86_64.zip
# /bin/bash greenplum-db-4.3.15.0-rhel5-x86_64.bin
  
## Default 으로 설치 (대부분의 사이트에서 동일하게 설치 함) # source /usr/local/greenplum-db-4.3.15.0/greenplum_path.sh
# vi hostfile
mdw
smdw
sdw1
sdw2
sdw3
...
## GPDB 클러스터간의 ssh 키 교환
# gpssh-exkeys -f hostfile
mdw 
GPDB Binary 모든 노드 설치 및 확인## 모든 노드에 GP Binary 설치 # gpseginstall -f hostfile -u gpadmin -p changememdw마스터의 gpdb binary를 모든 노드에 copy 함
## 모든 노드에 설치되어 있는지 확인 # gpssh -f hostfile
=> hostname
=> cd /usr/local
=> ls -la | grep greenplum
mdw 
 # cp hostfile hostfile_m # vi hostfile_m
mdw
smdw
  # vi hostfile_s
sdw1
sdw2
sdw3
  
# gpssh -f hostfile_m => mkdir -p /data/master
=> chown -R gpadmin:gpadmin /data
=> exit

# gpssh -f hostfile_s
=> mkdir -p /data/primary
=> mkdir -p /data/mirror
=> chown -R gpadmin:gpadmin /data
  
 # su - gpadmin $ source /usr/local/greenplum-db/greenplum_path.sh
$ cp -r /usr/local/greenplum-db/docs/cli_help/gpconfigs .
$ cd ~gpconfigs
$ vi gpinitsystem_config
declare -a DATA_DIRECTORY=(/data/primary /data/primary)
MASTER_HOSTNAME=mdw
MASTER_DIRECTORY=/data/master
$ vi hostfile
mdw
smdw
sdw1
sdw2
sdw3
$ vi hostfile_seg
sdw1
sdw2
sdw3

$ gpinitsystem -c gpinitsystem_config -h hostfile_seg
  
 $ gpaddmirrors -o mirror_config -s /data/mirror
/data/mirror
Y
## 미러 구성 확인
$ cat mirror_config
filespaceOrder=
mirror0=0:sdw2:41000:42000:43000:/data/mirror/gpseg0
mirror1=1:sdw3:41000:42000:43001:/data/mirror/gpseg1
mirror2=2:sdw3:41001:42001:43000:/data/mirror/gpseg2
mirror3=3:sdw1:41000:42000:43001:/data/mirror/gpseg3
mirror4=4:sdw1:41001:42001:43000:/data/mirror/gpseg4
mirror5=5:sdw2:41001:42001:43001:/data/mirror/gpseg5

## 미러 구성
$ gpaddmirrors -i mirror_config

## 구성 진행 상황 확인
$ gpstate -e
## 상태 확인
$ gpstate -c
  
Master 미러링 구성## $ gpinitstandby -s smdw

## 구성 상태 확인
$ gpstate -f
  
환경 설정$ su - gpadmin $ vi .bash_profile

source /usr/local/greenplum-db/greenplum_path.sh
export MASTER_DATA_DIRECTORY=/data/master/gpseg-1
  
모니터링 툴 설치Command Center 설치$ gpperfmon_install --enable --password changeme --port 5432 $ gpstop -af
$ gpstart -a
  
Command Center 설치$ su - # cd /data/setup
# unzip greenplum-cc-web-3.2.2-LINUX-x86_64.zip
# /bin/bash greenplum-cc-web-3.2.2-LINUX-x86_64.bin
Default (Y, Y, Y …)

## 권한 변경
# chown -R gpadmin:gpadmin /usr/local/greenplum-cc-web*


$ su - gpadmin
$ vi .bash_profile
  
## 추가 . /usr/local/greenplum-cc-web/gpcc_path.sh

$ source .bash_profile
$ gpcmdr --setup
$ gpcmdr --start testdb
  
Command Center 접속## gp command center 접속 http://MASTERIP:28080

http://172.16.150.130:28080
  

댓글 1개:

  1. 안녕하세요, 지금 그린플럼 오픈소스 버전을 설치하다가 도중에 문제가 생겨서 막혔는데, 도저히 원인을 모르겠어서 다른 설치방법을 알아보고 있습니다. 여기 소개해놓으신 방법은 오픈소스 버전이 아닌가요?

    답글삭제

Greenplum 제품 알람 공지 수신

Greenplum Product Notifications   * Critical Alerts - 제품 작동에 중요하고 고객 환경에 큰 영향을 미치거나, 많은 고객에게 부정적인 영향을 미칠 수 있는 큰 영향 및/또는 광범위한 소프트웨어 문제. * Pr...