greenplum 在单机上安装

1.操作系统centos 5.5
2.安装介质 greenplum-db-4.1.1.1-build-1-RHEL5-i386
3.在单机上安装master节点,并安装两个seg
4.在安装过程中最好先执行
关掉不需要的服务
service iptables save
service iptables stop
chkconfig iptables off
service ip6tables save
service ip6tables stop
chkconfig ip6tables off

5.在更改/etc/hosts 时需要检查hostsname 是否更改正确。

安装过程
1. 更改系统参数
vi /etc/sysctl.conf
kernel.sem = 250 64000 100 512
kernel.shmmax = 500000000
kernel.shmmni = 4096
kernel.shmall = 4000000000
kernel.sem = 250 64000 100 512
kernel.sysrq = 1
kernel.core_uses_pid = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
net.ipv4.tcp_syncookies = 1
net.ipv4.ip_forward = 0
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.conf.default.arp_filter = 1
net.core.netdev_max_backlog=10000
vm.overcommit_memory=2

vi /etc/security/limits.conf
* soft nofile 65536 
* hard nofile 65536 
* soft nproc 131072
* hard nproc 131072

vi /etc/hosts  (注意需要更改hostname 为dmw)
127.0.0.1       mdw


2.解压程序
./greenplum-db-4.1.1.1-build-1-RHEL5-i386.bin

useradd gpadmin

chown -R gpadmin:gpadmin greenplum-db-4.1.1.1
chown -R gpadmin:gpadmin greenplum-db

vi ~/.bashrc 

3.配置系统并安装数据
 source /usr/local/greenplum-db/greenplum_path.sh
 
 mkdir -p /home/gpadmin/gpconfigs
 cd /home/gpadmin/gpconfigs
 创建 seg_hosts 文件并输入
 mdw
 
 gpssh-exkeys -f  ./seg_hosts  (如果在安装的过程中更改了gpadmin密码,需要先 rm ~/.ssh)
 gpssh -f ./seg_hosts (测试是否连通)
 
cp /usr/local/greenplum-db/docs/cli_help/gpconfigs/gpinitsystem_config ./
修改 gpinitsystem_config
其中
declare -a DATA_DIRECTORY=(/data1/primary /data1/primary) 表示seg的数量
MASTER_HOSTNAME=mdw 主机名称
DATABASE_NAME=name_of_database  创建的数据库名称
MACHINE_LIST_FILE=/home/gpadmin/gpconfigs/seg_hosts   制定主机配置文件
 
关掉不需要的服务
service iptables save
service iptables stop
chkconfig iptables off
service ip6tables save
service ip6tables stop
chkconfig ip6tables off


gpinitsystem  -c ./gpinitsystem_config

gpinitsystem_config 配置详情

 

ARRAY_NAME="EMC Greenplum DW"

SEG_PREFIX=gpseg

PORT_BASE=40000

declare -a DATA_DIRECTORY=(/data1/primary /data1/primary  /data2/primary /data2/primary ) 

MASTER_HOSTNAME=gmaster

MASTER_DIRECTORY=/data/master

MASTER_PORT=5432

TRUSTED_SHELL=ssh

CHECK_POINT_SEGMENTS=8

ENCODING=UNICODE

 
 
20110830:23:00:33:gpinitsystem:mdw:gpadmin-[INFO]:-Greenplum Database instance successfully created
20110830:23:00:33:gpinitsystem:mdw:gpadmin-[INFO]:-------------------------------------------------------
20110830:23:00:33:gpinitsystem:mdw:gpadmin-[INFO]:-To complete the environment configuration, please
20110830:23:00:33:gpinitsystem:mdw:gpadmin-[INFO]:-update gpadmin .bashrc file with the following
20110830:23:00:33:gpinitsystem:mdw:gpadmin-[INFO]:-1. Ensure that the greenplum_path.sh file is sourced
20110830:23:00:33:gpinitsystem:mdw:gpadmin-[INFO]:-2. Add "export MASTER_DATA_DIRECTORY=/data/master/gpseg-1"
20110830:23:00:34:gpinitsystem:mdw:gpadmin-[INFO]:-   to access the Greenplum scripts for this instance:
20110830:23:00:34:gpinitsystem:mdw:gpadmin-[INFO]:-   or, use -d /data/master/gpseg-1 option for the Greenplum scripts
20110830:23:00:34:gpinitsystem:mdw:gpadmin-[INFO]:-   Example gpstate -d /data/master/gpseg-1
20110830:23:00:34:gpinitsystem:mdw:gpadmin-[INFO]:-Script log file = /home/gpadmin/gpAdminLogs/gpinitsystem_20110830.log
20110830:23:00:34:gpinitsystem:mdw:gpadmin-[INFO]:-To remove instance, run gpdeletesystem utility
20110830:23:00:35:gpinitsystem:mdw:gpadmin-[INFO]:-To initialize a Standby Master Segment for this Greenplum instance
20110830:23:00:35:gpinitsystem:mdw:gpadmin-[INFO]:-Review options for gpinitstandby
20110830:23:00:35:gpinitsystem:mdw:gpadmin-[INFO]:-------------------------------------------------------
20110830:23:00:35:gpinitsystem:mdw:gpadmin-[INFO]:-The Master /data/master/gpseg-1/pg_hba.conf post gpinitsystem
20110830:23:00:35:gpinitsystem:mdw:gpadmin-[INFO]:-has been configured to allow all hosts within this new
20110830:23:00:36:gpinitsystem:mdw:gpadmin-[INFO]:-array to intercommunicate. Any hosts external to this
20110830:23:00:36:gpinitsystem:mdw:gpadmin-[INFO]:-new array must be explicitly added to this file
20110830:23:00:36:gpinitsystem:mdw:gpadmin-[INFO]:-Refer to the Greenplum Admin support guide which is
20110830:23:00:36:gpinitsystem:mdw:gpadmin-[INFO]:-located in the /usr/local/greenplum-db/./docs directory
20110830:23:00:36:gpinitsystem:mdw:gpadmin-[INFO]:-------------------------------------------------------

表示成功安装
添加 export MASTER_DATA_DIRECTORY=/data/master/gpseg-1  到 ~/.bashrc

修改 /data/master/gpseg-1/ 中的pg_hba.conf 和 postgresql.conf

 

阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页