GreenPlum 4.3集群安装(一)

GreenPlum 4.3 SUSE集群安装手册

GreenPlum安装前,对各服务器主机的规划如下:

服务器版本:SUSE Linux Enterprise Server 11 SP1  (x86_64) - Kernel

GP系统规划:*1Master+2*Segment+2*Mirror

集群数量及hostname2台(10.41.82.28  linux-82

10.41.24.101  NOAS252

Master主机:10.41.82.28  linux-82

Segment主机:10.41.24.101  NOAS252 (备注:2Mirror安装在Segment主机上)

GreenPlum版本:greenplum-db-4.3.0.0-SuSE10-x86_64

 

安装的Greenplum的目录架构包括如下几个主要部分:

安装环境准备

Master环境

Segment环境

用户主目录

/home/gpadmin

/home/gpadmin

程序目录

/usr/local/greenplum-db

/usr/local/greenplum-db

配置文件目录

/home/gpadmin/gpAdminLogs

/home/gpadmin/gpAdminLogs

数据目录

/opt/greenplum/master/gpseg-1

(数据字典)

/opt/greenplum/primary/gpseg0, /opt/greenplum/primary/gpseg1, /opt/greenplum/mirror/gpseg0, /opt/greenplum/mirror/gpseg1

 

1.0 首先检查防火墙是否关闭

在安装Vertica数据库之前,您需要关闭防火墙。

操作步骤

                                步骤 1     root用户登录数据库服务器。

                                步骤 2     执行如下命令,检查防火墙是否关闭。

#chkconfig --list|grep fire

系统显示如下类似信息:

SuSEfirewall2_init        0:off  1:off  2:off  3:off  4:off  5:off  6:off
SuSEfirewall2_setup       0:off  1:off  2:off  3:off  4:off  5:off 6:off

如果都是“off”,表明防火墙已经关闭;否则,执行步骤3关闭防火墙。

                                步骤 3     执行如下命令,关闭防火墙。

# chkconfig --level 0123456 SuSEfirewall2_init off

# chkconfig --level 0123456 SuSEfirewall2_setup off

----结束

 

2.0 系统参数设置

操作步骤

                                步骤 1     root用户登录数据库服务器。

                                步骤 2     master主机与segment主机上分别设置参数执行如下命令,

# 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

net.core.rmem_max = 2097152

net.core.wmem_max = 2097152

vm.overcommit_memory = 2

       注:上面的配置文件保存后,可以执行 sysctl –p 。以此可以避免重启电脑操作。

                                步骤 3     master主机与segment主机上分别设置参数执行如下命令,

# vi /etc/security/limits.conf

* soft nofile 65536

* hard nofile 65536

* soft nproc 131072

* hard nproc 131072

                                步骤 4     编辑每一台节点机的hostsvi /etc/hosts

如:

127.0.0.1       localhost.localdomain localhost

10.41.24.102    linux116

10.41.24.103    NOAS252

 

                                步骤 5     对当前系统的调度磁盘进行扩容,一般默认的1024。对应操作如下:

# echo deadline > /sys/block/sda/queue/scheduler

# /sbin/blockdev --setra 16385 /dev/sda

# /sbin/blockdev --getra /dev/sda

*此时可以查看到大小已经有1024扩容到16385*

sdbsbc参照上面sda进行操作。

 

NOTE:以上参数修改后,建议服务器重启后生效(提醒:服务器重启前,需将所有正在运行的进程关闭,如:oracleverticabicp)。sysctl.conf若执行sysctl –p 可避免重启。

 

3.0 运行Greenplum安装程序

操作步骤

                                步骤 1     root用户登录数据库服务器。

                                步骤 2     执行如下命令对安装zip文件解压缩,如

# unzip greenplum-db-4.3.0.0-SuSE10-x86_64.zip

                                步骤 3     使用bash执行安装:

# /bin/bash greenplum-db-4.3.0.0-SuSE10-x86_64.bin

按下回车之后出现如下许可协议:

*******************************************************************************

You must read and accept the Greenplum Database license agreement

before installing

*******************************************************************************

 

EMC GREENPLUM COMMUNITY EDITION

Software License Agreement

 

...

 

I HAVE READ AND AGREE TO THE TERMS OF THE ABOVE GREENPLUM SOFTWARE

LICENSE AGREEMENT.

 

按照提示输入yes接受许可协议。

 

*******************************************************************************

Do you accept the EMC Database license agreement? [yes|no]

*******************************************************************************

yes

 

指定安装目录,直接回车为安装到默认路径:

*******************************************************************************

Provide the installation path for Greenplum Database or press ENTER to

accept the default installation path: /usr/local/greenplum-db

*******************************************************************************

回车

*******************************************************************************

Install Greenplum Database into </usr/local/greenplum-db>? [yes|no]

*******************************************************************************

yes

 

*******************************************************************************

/usr/local/greenplum-db does not exist.

Create /usr/local/greenplum-db ? [yes|no ]

(Selecting no will exit the installer)

*******************************************************************************

yes

 

可选项,若有老版本的GP已安装,可以使用此步骤将GP扩展配置进行迁移:

*******************************************************************************

[Optional] Provide the path to a previous installation of Greenplum Database,

or press ENTER to skip this step. e.g. /usr/local/greenplum-db-4.1.1.3

 

This installation step will migrate any Greenplum Database extensions from the

provided path to the version currently being installed. This step is optional

and can be run later with:

gppkg --migrate <path_to_old_gphome> /usr/local/greenplum-db

*******************************************************************************

回车

 

成功的安装日志如下:

Extracting product to /usr/local/greenplum-db

 

 

Skipping migration of Greenplum Database extensions...

 

*******************************************************************************

Installation complete.

Greenplum Database is installed in /usr/local/greenplum-db

 

Greenplum Database documentation is available for download

at http://powerlink.emc.com.

*******************************************************************************

 

4.0 安装与配置Greenplum

操作步骤

                                步骤 1     root用户登录数据库服务器 su -,在master主机上进行下面的操作;

                                步骤 2     执行如下命令:

# source /usr/local/greenplum-db/greenplum_path.sh

                                步骤 3      /usr/local/greenplum-db下新建配置文件夹:

linux-82:/usr/local/greenplum-db/conf # vi hostfile_exkeys

                                步骤 4     hostfile_exkeys文件中添加mastersegment主机名,如下:

linux-82

linux113

                                步骤 5     root用户下创建互信关系,如下:

linux-82:/usr/local/greenplum-db/conf # gpssh-exkeys -f hostfile_exkeys

信息如下:

[STEP 1 of 5] create local ID and authorize on local host

  ... /root/.ssh/id_rsa file exists ... key generation skipped

 

[STEP 2 of 5] keyscan all hosts and update known_hosts file

 

[STEP 3 of 5] authorize current user on remote hosts

  ... send to linux113

 

[STEP 4 of 5] determine common authentication file content

 

[STEP 5 of 5] copy authentication files to all remote hosts

  ... finished key exchange with linux113

 

[INFO] completed successfully

 

                                步骤 6     mastersegment主机上分别建立分组gpadmin,如下:

# groupadd gpadmin

                                步骤 7     执行gpseginstall命令,如下:

# gpseginstall -f hostfile_exkeys -u gpadmin -p gpadmin

安装信息如下:

20140414:16:04:31:049389 gpseginstall:linux-82:root-[INFO]:-Installation Info:

link_name None

binary_path /usr/local/greenplum-db

binary_dir_location /usr/local

binary_dir_name greenplum-db

20140414:16:04:31:049389 gpseginstall:linux-82:root-[INFO]:-check cluster password access

20140414:16:04:33:049389 gpseginstall:linux-82:root-[INFO]:-de-duplicate hostnames

20140414:16:04:33:049389 gpseginstall:linux-82:root-[INFO]:-master hostname: linux-82

20140414:16:04:34:049389 gpseginstall:linux-82:root-[INFO]:-check for user gpadmin on cluster

20140414:16:04:34:049389 gpseginstall:linux-82:root-[INFO]:-add user gpadmin on master

20140414:16:04:34:049389 gpseginstall:linux-82:root-[INFO]:-add user gpadmin on cluster

20140414:16:04:34:049389 gpseginstall:linux-82:root-[INFO]:-chown -R gpadmin:gpadmin /usr/local/greenplum-db

20140414:16:04:34:049389 gpseginstall:linux-82:root-[INFO]:-rm -f /usr/local/greenplum-db.tar; rm -f /usr/local/greenplum-db.tar.gz

20140414:16:04:35:049389 gpseginstall:linux-82:root-[INFO]:-cd /usr/local; tar cf greenplum-db.tar greenplum-db

20140414:16:04:37:049389 gpseginstall:linux-82:root-[INFO]:-gzip /usr/local/greenplum-db.tar

20140414:16:05:07:049389 gpseginstall:linux-82:root-[INFO]:-remote command: mkdir -p /usr/local

20140414:16:05:07:049389 gpseginstall:linux-82:root-[INFO]:-remote command: rm -rf /usr/local/greenplum-db

20140414:16:05:08:049389 gpseginstall:linux-82:root-[INFO]:-scp software to remote location

20140414:16:05:19:049389 gpseginstall:linux-82:root-[INFO]:-remote command: gzip -f -d /usr/local/greenplum-db.tar.gz

20140414:16:05:24:049389 gpseginstall:linux-82:root-[INFO]:-md5 check on remote location

20140414:16:05:26:049389 gpseginstall:linux-82:root-[INFO]:-remote command: cd /usr/local; tar xf greenplum-db.tar

20140414:16:05:28:049389 gpseginstall:linux-82:root-[INFO]:-remote command: rm -f /usr/local/greenplum-db.tar

20140414:16:05:29:049389 gpseginstall:linux-82:root-[INFO]:-remote command: chown -R gpadmin:gpadmin /usr/local/greenplum-db

20140414:16:05:29:049389 gpseginstall:linux-82:root-[INFO]:-rm -f /usr/local/greenplum-db.tar.gz

20140414:16:05:29:049389 gpseginstall:linux-82:root-[INFO]:-Changing system passwords ...

20140414:16:05:36:049389 gpseginstall:linux-82:root-[INFO]:-exchange ssh keys for user root

20140414:16:05:38:049389 gpseginstall:linux-82:root-[INFO]:-exchange ssh keys for user gpadmin

20140414:16:05:40:049389 gpseginstall:linux-82:root-[INFO]:-/usr/local/greenplum-db/sbin/gpfixuserlimts -f /etc/security/limits.conf -u gpadmin

20140414:16:05:40:049389 gpseginstall:linux-82:root-[INFO]:-remote command: . /usr/local/greenplum-db/greenplum_path.sh; /usr/local/greenplum-db/sbin/gpfixuserlimts -f /etc/security/limits.conf -u gpadmin

20140414:16:05:41:049389 gpseginstall:linux-82:root-[INFO]:-version string on master: gpssh version 4.3.0.0POC3 build 45206

20140414:16:05:41:049389 gpseginstall:linux-82:root-[INFO]:-remote command: . /usr/local/greenplum-db/greenplum_path.sh; /usr/local/greenplum-db/bin/gpssh --version

20140414:16:05:47:049389 gpseginstall:linux-82:root-[INFO]:-SUCCESS -- Requested commands completed

该步骤执行结束后,成功建立用户(gpadmin)、家目录(/   home/gpadmin)以及用户gpadmin在各主机上的ssh信用关系。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值