本文来自:fair-jm.iteye.com 转截请注明出处
安装的过程比较坎坷艰辛....先开始按照官方4.2的guideline
结果卡在了gpseginstall 这个工具
用这个工具一直卡在 输入seg1(segment1)的密码上...
用了root密码不行 用了gpadmin的密码也不行 (网上说是要允许root登陆 http://www.topix.com/forum/com/greenplum/TSDQHMJ6M7I9D0A44 但我这边root是绝对可以登录的...毕竟我本身都是在xshell里进行的...)
后来手工用ssh-keygen 和 ssh-copy-id也不行 ... ...
使用的虚拟机是virtualbox 4.3.8 并非是最新版
新建了三个centOS 6.5
m -> 192.168.56.130
seg1 -> 192.168.56.110
seg2 -> 192.168.56.120
hosts表 三个是用的同一份:
[gpadmin@master ~]$ cat /etc/hosts 192.168.56.130 master 192.168.56.110 seg1 192.168.56.120 seg2
并将hostname对应修改(重启生效):
[gpadmin@master ~]$ cat /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=master
这是在m这台虚拟机上的 在seg1上HOSTNAME要改为seg1 同理seg2
因为用的是centOS 6.5所以一些系统配置会不太一样 我在网上找了下 以下的配置可用:
http://www.infracoop.com.ar/blog/2013/12/installing-greenplum-ce-community-edition-on-virtualbox/ 写道
vi /etc/sysctl.conf
xfs_mount_options = rw,noatime,inode64,allocsize=16m
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.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.ip_local_port_range = 1025 65535
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
===
echo deadline > /sys/block/sdb/queue/scheduler
(这边的sdb 自己用df -h 看一下)
/sbin/blockdev --setra 16385 /dev/sdb
(这边的也同理 用df -h 看一下)
xfs_mount_options = rw,noatime,inode64,allocsize=16m
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.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.ip_local_port_range = 1025 65535
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
===
echo deadline > /sys/block/sdb/queue/scheduler
(这边的sdb 自己用df -h 看一下)
/sbin/blockdev --setra 16385 /dev/sdb
(这边的也同理 用df -h 看一下)
然后是在百度找到的一篇文档 里面其实就是手工做了pgseginstall做的事(见附件)
但这文档没有写(全)最后的gpinitsystem_config
我查阅了些资料把他遗漏的data和mirror的部分写上 完整的:
# FILE NAME: gpinitsystem_config
# Configuration file needed by the gpinitsystem
################################################
#### REQUIRED PARAMETERS
################################################
#### Name of this Greenplum system enclosed in quotes.
ARRAY_NAME="EMC Greenplum DW"
#### Naming convention for utility-generated data directories.
SEG_PREFIX=gpseg
#### Base number by which primary segment port numbers
#### are calculated.
PORT_BASE=40000
#### File system location(s) where primary segment data directories
#### will be created. The number of locations in the list dictate
#### the number of primary segments that will get created per
#### physical host (if multiple addresses for a host are listed in
#### the hostfile, the number of segments will be spread evenly across
#### the specified interface addresses).
declare -a DATA_DIRECTORY=(/data/data1)
#### OS-configured hostname or IP address of the master host.
MASTER_HOSTNAME=master
根据自己的master的名字命名
#### File system location where the master data directory
#### will be created.
MASTER_DIRECTORY=/data/master
根据master中创建的文件夹命名
#### Port number for the master instance.
MASTER_PORT=5432
#### Shell utility used to connect to remote hosts.
TRUSTED_SHELL=ssh
#### Maximum log file segments between automatic WAL checkpoints.
CHECK_POINT_SEGMENTS=8
#### Default server-side character set encoding.
ENCODING=UNICODE
################################################
#### OPTIONAL MIRROR PARAMETERS
################################################
#### Base number by which mirror segment port numbers
#### are calculated.
#MIRROR_PORT_BASE=50000
#### Base number by which primary file replication port
#### numbers are calculated.
#REPLICATION_PORT_BASE=41000
#### Base number by which mirror file replication port
#### numbers are calculated.
#MIRROR_REPLICATION_PORT_BASE=51000
#### File system location(s) where mirror segment data directories
#### will be created. The number of mirror locations must equal the
#### number of primary locations as specified in the
#### DATA_DIRECTORY parameter.
declare -a MIRROR_DATA_DIRECTORY=(/data/data2)
这边的设置是指定放镜像的目录 原文在每个seg下都建了data1 和 data2
################################################
#### OTHER OPTIONAL PARAMETERS
################################################
#### Create a database of this name after initialization.
#DATABASE_NAME=name_of_database
DATABASE_NAME=gpsun
#### Specify the location of the host address file here instead of
#### with the the -h option of gpinitsystem.
MACHINE_LIST_FILE=/home/gpadmin/all_segs
这样操作应该不会再有问题 有遇到问题 或者知道怎么解决gpseginstall安装的同学 欢迎留言 ^_^