GREENPLUM的安装和部署
在虚拟机上安装greenplum:
1.操作系统redhat 2.6.18-53.el5xen
2.安装介质 greenplum-db-4.2.2.0-build-3-RHEL5-i386.zip
3.准备单机上单机版安装,安装一个master节点,并安装两个segment
4.虚拟机磁盘空间情况:
[root@mdw ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 8.6G 2.2G 5.9G 27% /
/dev/sda5 14G 164M 13G 2% /data
/dev/sda1 99M 18M 77M 19% /boot
5.因为greenplum4.1只支持UTF-8字符集,所以在建立安装用户的时候需要把用户的默认字符集设置为utf-8,greenplum4.2能否支持其他字符集还待证实。
(注:greenplum-db-4.1的安装方法也是一样的)
1.1 LINUX系统关闭防火墙
因为greenplum集群各个节点是通过 ssh协议来互相访问的,所以需要关闭防火墙。
.3.1.1可以在安装linux的过程中关闭掉,
要关闭防护墙,安装LINUX的时候可以在firewall选项选择:disabled
这个玩意也关掉:
.3.1.2对已经安装好的linux使用以下方法来关闭
关闭SELinux的方法:
1、修改/etc/selinux/config文件中的SELINUX="" 为 disabled ,然后重启。
2、使用命令setenforce 0 ,不需要重启。
注:
setenforce 1 是设置SELinux 成为enforcing模式
setenforce 0 是设置SELinux 成为permissive模式
1.2 编辑/etc/sysctl.conf 和/etc/security/limits.conf
.3.2.1编辑sysctl.conf修改或添加系统参数
使用root用户编辑:
vi /etc/sysctl.conf
kernel.sem = 250 64000 100 512
kernel.shmmax = 500000000
kernel.shmmni = 4096
kernel.shmall = 4000000000
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
.3.2.2编辑sysctl.conf修改或添加系统参数
使用root用户编辑:
vi /etc/security/limits.conf
- soft nofile 65536
- hard nofile 65536
- soft nproc 131072
- hard nproc 131072
1.3 修改主节点/etc/hosts
使用root用户编辑/etc/hosts文件:
[root@mdw security]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 mdw localhost.localdomain localhost
#--hcb----::1 localhost6.localdomain6 localhost6
192.168.153.190 mdw mdw
192.168.153.190 sdw1 sdw1
192.168.153.190 sdw2 sdw2
1.4 创建gpadmin用户(greenplum默认的超级用户)
使用root用户:
建立用户组gpadmin
groupadd gpadmin
建立用户gpadmin
useradd -m -g gpadmin gpadmin
passwd gpadmin
将/data目录的属主修改为gpadmin
chown –R gpadmin:gpadmin /data
/data目录将是我们安装greemplum的目录
gpadmin用户将是我们安装greemplum的用户
使用gpadmin用户:
在/data下创建master、dbseg1和dbseg2目录
su -l gpadmin
cd /data
mkdir master
mkdir dbseg1
mkdir dbseg2
1.5 解压安装文件输入安装路径并赋权给gpadmin
将安装介质greenplum-db-4.2.2.0-build-3-RHEL5-i386.zip上传到/home/gpadmin目录下。
解压greenplum-db-4.2.2.0-build-3-RHEL5-i386.zip
得到greenplum-db-4.2.2.0-build-3-RHEL5-i386.bin
用gpadmin用户执行这个bin文件:
./ greenplum-db-4.2.2.0-build-3-RHEL5-i386.bin
显示一堆文字,按回车键直到显示:
Do you accept the Greenplum 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- 4.2.2.0
输入: /data/greenplum-db-4.2.2.0
<<--如果这个目录不存在的话安装程序会询问是否要创建
Install Greenplum Database into ? [yes|no]
输入: yes ,回车
/data/greenplum-db-4.2.2.0 does not exist. <<--是否要创建greenplum-db-4.2.2.0这个目录?
Create /data/greenplum-db-4.2.2.0 ? [yes|no]
(Selecting no will exit the installer)
Yes
[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
按回车
Extracting product to /data/greenplum-db-4.2.2.0
Skipping migration of Greenplum Database extensions...
Installation complete.
Greenplum Database is installed in /data/greenplum-db-4.2.2.0
Greenplum Database documentation is available for download
at http://powerlink.emc.com.
*> ******************************************************************************
OK,这一步完成。
1.6 创建all_host和seg_host文件
进入目录/home/gpadmin
mkdir gpconfigs
cd gpconfigs
vi all_hosts <<--包含master和segment的全部主机名称
mdw
sdw1
sdw2
vi all_segs <<--只包含segment的主机名称
sdw1
sdw2
1.7 设置安装用户的环境变量
编辑gpadmin用户的启动文件,在末尾加入greenplum工具路径
vi .bash_profile
source /data/greenplum-db-4.2.2.0/greenplum_path.sh
执行一下:
source /home/gpadmin/.bash_profile
[gpadmin@mdw gpconfigs]$
编辑/home/gpadmin/.bashrc
添加 export MASTER_DATA_DIRECTORY=/data/master/gpseg-1,
然后执行source /home/gpadmin/.bashrc。
1.8 为安装用户设置各个节点的SSH连接
用greenplum的gpssh-exkeys工具为所有master和segment创建gpadmin用户无需输入密码的信任连接。
[gpadmin@mdw ~]$ gpssh-exkeys -f /home/gpadmin/gpconfigs/all_hosts
[STEP 1 of 5] create local ID and authorize on local host
[STEP 2 of 5] keyscan all hosts and update known_hosts file
[STEP 3 of 5] authorize current user on remote hosts
... send to sdw1
... send to sdw2
[STEP 4 of 5] determine common authentication file content
[STEP 5 of 5] copy authentication files to all remote hosts
... finished key exchange with sdw1
... finished key exchange with sdw2
[INFO] completed successfully
测试各个节点是否能连通
gpssh -f ./all_hosts <<--单机版的可以不测这个东西
[gpadmin@mdw gpconfigs]$ gpssh -h mdw
=> echo $HOSTNAME
[mdw] mdw
=> exit
[gpadmin@mdw gpconfigs]$ gpssh -h sdw1
=> echo $HOSTNAME
[sdw1] mdw
=> exit
[gpadmin@mdw gpconfigs]$ gpssh -h sdw2
=> echo $HOSTNAME
[sdw2] mdw
=> exit
1.9 编辑安装配置文件gpinitsystem_config
将/data/greenplum-db-4.2.2.0/docs/cli_help/gpconfigs/gpinitsystem_config
复制到/home/gpadmin/gpconfigs
然后编辑之:
vi gpinitsystem_config
# FILE NAME: gpinitsystem_config
# Configuration file needed by the gpinitsystem
################################################
#### REQUIRED PARAMETERS
################################################
#### Name of this Greenplum system enclosed in quotes.
#--hcb--ARRAY_NAME="EMC Greenplum DW"
ARRAY_NAME="HCB_GPDW"
#### 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).
#--hcb--declare -a DATA_DIRECTORY=(/data1/primary /data1/primary /data1/primary /data2/primary /data2/primary /data2/primary)
#--hcb---修改为下面这行--
declare -a DATA_DIRECTORY=(/data/dbseg1 /data/dbseg2)
#### OS-configured hostname or IP address of the master host.
MASTER_HOSTNAME=mdw
#### File system location where the master data directory
#### will be created.
MASTER_DIRECTORY=/data/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=(/data1/mirror /data1/mirror /data1/mirror /data2/mirror /data2/mirror /data2/mirror)
################################################
#### OTHER OPTIONAL PARAMETERS
################################################
#### Create a database of this name after initialization.
#DATABASE_NAME=name_of_database
#--hcb---输入--
DATABASE_NAME=hcb_bi <<--完成greenplum初始化后创建库hcb_bi
#### Specify the location of the host address file here instead of
#### with the the -h option of gpinitsystem.
#MACHINE_LIST_FILE=/home/gpadmin/gpconfigs/hostfile_gpinitsystem
#--hcb---输入--
MACHINE_LIST_FILE=/home/gpadmin/gpconfigs/all_segs
完成。
1.10 初始化数据库(即安装)
用root用户修改192.168.153.190上 /etc/ssh/ssh_config
编辑 GSSAPIAuthentication 为no
用gpadin用户执行初始化greenplum系统的配置文件
gpinitsystem -c /home/gpadmin/gpconfigs/gpinitsystem_config
[gpadmin@mdw gpconfigs]$ gpinitsystem -c /home/gpadmin/gpconfigs/gpinitsystem_config
20120624:09:57:17:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Checking configuration parameters, please wait...
20120624:09:57:18:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Reading Greenplum configuration file /home/gpadmin/gpconfigs/gpinitsystem_config
20120624:09:57:18:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Locale has not been set in /home/gpadmin/gpconfigs/gpinitsystem_config, will set to default value
20120624:09:57:19:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Locale set to en_US.utf8
20120624:09:57:21:020753 gpinitsystem:mdw:gpadmin-[INFO]:-MASTER_MAX_CONNECT not set, will set to default value 250
20120624:09:57:22:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Checking configuration parameters, Completed
20120624:09:57:22:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Commencing multi-home checks, please wait...
..
20120624:09:57:24:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Configuring build for multi-home array
20120624:09:57:24:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Commencing multi-home checks, Completed
20120624:09:57:25:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Building primary segment instance array, please wait...
..
20120624:09:57:29:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Checking Master host
20120624:09:57:30:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Checking new segment hosts, please wait...
..
20120624:09:57:40:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Checking new segment hosts, Completed
20120624:09:57:41:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Greenplum Database Creation Parameters
20120624:09:57:41:020753 gpinitsystem:mdw:gpadmin-[INFO]:---------------------------------------
20120624:09:57:41:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Master Configuration
20120624:09:57:41:020753 gpinitsystem:mdw:gpadmin-[INFO]:---------------------------------------
20120624:09:57:42:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Master instance name = HCB_GPDW
20120624:09:57:42:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Master hostname = mdw
20120624:09:57:42:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Master port = 5432
20120624:09:57:42:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Master instance dir = /data/master/gpseg-1
20120624:09:57:42:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Master LOCALE = en_US.utf8
20120624:09:57:42:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Greenplum segment prefix = gpseg
20120624:09:57:43:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Master Database = hcb_bi
20120624:09:57:43:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Master connections = 250
20120624:09:57:43:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Master buffers = 128000kB
20120624:09:57:43:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Segment connections = 750
20120624:09:57:43:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Segment buffers = 128000kB
20120624:09:57:43:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Checkpoint segments = 8
20120624:09:57:43:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Encoding = UNICODE
20120624:09:57:44:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Postgres param file = Off
20120624:09:57:44:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Initdb to be used = /data/greenplum-db/./bin/initdb
20120624:09:57:44:020753 gpinitsystem:mdw:gpadmin-[INFO]:-GP_LIBRARY_PATH is = /data/greenplum-db/./lib
20120624:09:57:44:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Ulimit check = Passed
20120624:09:57:44:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Array host connect type = Multi hostname per node
20120624:09:57:44:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Master IP address [1] = ::1
20120624:09:57:45:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Master IP address [2] = 192.168.122.1
20120624:09:57:45:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Master IP address [3] = 192.168.153.190
20120624:09:57:45:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Master IP address [4] = fe80::200:ff:fe00:0
20120624:09:57:45:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Master IP address [5] = fe80::20c:29ff:fea4:2a16
20120624:09:57:45:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Master IP address [6] = fe80::fcff:ffff:feff:ffff
20120624:09:57:45:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Standby Master = Not Configured
20120624:09:57:46:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Primary segment # = 2
20120624:09:57:46:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Total Database segments = 2
20120624:09:57:46:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Trusted shell = ssh
20120624:09:57:46:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Number segment hosts = 2
20120624:09:57:46:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Mirroring config = OFF
20120624:09:57:46:020753 gpinitsystem:mdw:gpadmin-[INFO]:----------------------------------------
20120624:09:57:47:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Greenplum Primary Segment Configuration
20120624:09:57:47:020753 gpinitsystem:mdw:gpadmin-[INFO]:----------------------------------------
20120624:09:57:47:020753 gpinitsystem:mdw:gpadmin-[INFO]:-sdw1 /data/dbseg1/gpseg0 40000 2 0
20120624:09:57:47:020753 gpinitsystem:mdw:gpadmin-[INFO]:-sdw2 /data/dbseg2/gpseg1 40001 3 1
Continue with Greenplum creation Yy/Nn>
y
20120624:09:58:16:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Building the Master instance database, please wait...
20120624:09:59:29:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Starting the Master in admin mode
20120624:09:59:59:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Commencing parallel build of primary segment instances
20120624:09:59:59:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Spawning parallel processes batch [1], please wait...
..
20120624:10:00:01:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Waiting for parallel processes batch [1], please wait...
.........................................................................................................................................................................
20120624:10:03:10:020753 gpinitsystem:mdw:gpadmin-[INFO]:------------------------------------------------
20120624:10:03:10:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Parallel process exit status
20120624:10:03:10:020753 gpinitsystem:mdw:gpadmin-[INFO]:------------------------------------------------
20120624:10:03:10:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Total processes marked as completed = 2
20120624:10:03:10:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Total processes marked as killed = 0
20120624:10:03:11:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Total processes marked as failed = 0
20120624:10:03:11:020753 gpinitsystem:mdw:gpadmin-[INFO]:------------------------------------------------
20120624:10:03:11:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Deleting distributed backout files
20120624:10:03:12:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Removing back out file
20120624:10:03:12:020753 gpinitsystem:mdw:gpadmin-[INFO]:-No errors generated from parallel processes
20120624:10:03:12:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Restarting the Greenplum instance in production mode
20120624:10:03:13:001718 gpstop:mdw:gpadmin-[INFO]:-Starting gpstop with args: -a -i -m -d /data/master/gpseg-1
20120624:10:03:13:001718 gpstop:mdw:gpadmin-[INFO]:-Gathering information and validating the environment...
20120624:10:03:14:001718 gpstop:mdw:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information
20120624:10:03:14:001718 gpstop:mdw:gpadmin-[INFO]:-Obtaining Segment details from master...
20120624:10:03:14:001718 gpstop:mdw:gpadmin-[INFO]:-Greenplum Version: 'postgres (Greenplum Database) 4.2.1.0 build 3'
20120624:10:03:14:001718 gpstop:mdw:gpadmin-[INFO]:-There are 0 connections to the database
20120624:10:03:14:001718 gpstop:mdw:gpadmin-[INFO]:-Commencing Master instance shutdown with mode='immediate'
20120624:10:03:14:001718 gpstop:mdw:gpadmin-[INFO]:-Master host=mdw
20120624:10:03:14:001718 gpstop:mdw:gpadmin-[INFO]:-Commencing Master instance shutdown with mode=immediate
20120624:10:03:14:001718 gpstop:mdw:gpadmin-[INFO]:-Master segment instance directory=/data/master/gpseg-1
20120624:10:03:15:001801 gpstart:mdw:gpadmin-[INFO]:-Starting gpstart with args: -a -d /data/master/gpseg-1
20120624:10:03:15:001801 gpstart:mdw:gpadmin-[INFO]:-Gathering information and validating the environment...
20120624:10:03:16:001801 gpstart:mdw:gpadmin-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 4.2.1.0 build 3'
20120624:10:03:16:001801 gpstart:mdw:gpadmin-[INFO]:-Greenplum Catalog Version: '201109210'
20120624:10:03:16:001801 gpstart:mdw:gpadmin-[INFO]:-Starting Master instance in admin mode
20120624:10:03:20:001801 gpstart:mdw:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information
20120624:10:03:20:001801 gpstart:mdw:gpadmin-[INFO]:-Obtaining Segment details from master...
20120624:10:03:21:001801 gpstart:mdw:gpadmin-[INFO]:-Setting new master era
20120624:10:03:21:001801 gpstart:mdw:gpadmin-[INFO]:-Master Started...
20120624:10:03:21:001801 gpstart:mdw:gpadmin-[INFO]:-Shutting down master
20120624:10:03:25:001801 gpstart:mdw:gpadmin-[INFO]:-No standby master configured. skipping...
20120624:10:03:25:001801 gpstart:mdw:gpadmin-[INFO]:-Commencing parallel segment instance startup, please wait...
.........
20120624:10:03:34:001801 gpstart:mdw:gpadmin-[INFO]:-Process results...
20120624:10:03:34:001801 gpstart:mdw:gpadmin-[INFO]:-----------------------------------------------------
20120624:10:03:34:001801 gpstart:mdw:gpadmin-[INFO]:- Successful segment starts = 2
20120624:10:03:34:001801 gpstart:mdw:gpadmin-[INFO]:- Failed segment starts = 0
20120624:10:03:34:001801 gpstart:mdw:gpadmin-[INFO]:- Skipped segment starts (segments are marked down in configuration) = 0
20120624:10:03:34:001801 gpstart:mdw:gpadmin-[INFO]:-----------------------------------------------------
20120624:10:03:34:001801 gpstart:mdw:gpadmin-[INFO]:-
20120624:10:03:34:001801 gpstart:mdw:gpadmin-[INFO]:-Successfully started 2 of 2 segment instances
20120624:10:03:34:001801 gpstart:mdw:gpadmin-[INFO]:-----------------------------------------------------
20120624:10:03:34:001801 gpstart:mdw:gpadmin-[INFO]:-Starting Master instance mdw directory /data/master/gpseg-1
20120624:10:03:38:001801 gpstart:mdw:gpadmin-[INFO]:-Command pg_ctl reports Master mdw instance active
20120624:10:03:38:001801 gpstart:mdw:gpadmin-[INFO]:-Database successfully started
20120624:10:03:39:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Completed restart of Greenplum instance in production mode
20120624:10:03:39:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Loading gp_toolkit...
20120624:10:03:55:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Scanning utility log file for any warning messages
20120624:10:03:55:020753 gpinitsystem:mdw:gpadmin-[WARN]:-*******************************************************
20120624:10:03:55:020753 gpinitsystem:mdw:gpadmin-[WARN]:-Scan of log file indicates that some warnings or errors
20120624:10:03:56:020753 gpinitsystem:mdw:gpadmin-[WARN]:-were generated during the array creation
20120624:10:03:56:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Please review contents of log file
20120624:10:03:56:020753 gpinitsystem:mdw:gpadmin-[INFO]:-/home/gpadmin/gpAdminLogs/gpinitsystem_20120624.log
20120624:10:03:56:020753 gpinitsystem:mdw:gpadmin-[INFO]:-To determine level of criticality
20120624:10:03:56:020753 gpinitsystem:mdw:gpadmin-[INFO]:-These messages could be from a previous run of the utility
20120624:10:03:57:020753 gpinitsystem:mdw:gpadmin-[INFO]:-that was called today!
20120624:10:03:57:020753 gpinitsystem:mdw:gpadmin-[WARN]:-*******************************************************
20120624:10:03:57:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Greenplum Database instance successfully created
20120624:10:03:57:020753 gpinitsystem:mdw:gpadmin-[INFO]:-------------------------------------------------------
20120624:10:03:57:020753 gpinitsystem:mdw:gpadmin-[INFO]:-To complete the environment configuration, please
20120624:10:03:58:020753 gpinitsystem:mdw:gpadmin-[INFO]:-update gpadmin .bashrc file with the following
20120624:10:03:58:020753 gpinitsystem:mdw:gpadmin-[INFO]:-1. Ensure that the greenplum_path.sh file is sourced
20120624:10:03:58:020753 gpinitsystem:mdw:gpadmin-[INFO]:-2. Add "export MASTER_DATA_DIRECTORY=/data/master/gpseg-1"
20120624:10:03:58:020753 gpinitsystem:mdw:gpadmin-[INFO]:- to access the Greenplum scripts for this instance:
20120624:10:03:58:020753 gpinitsystem:mdw:gpadmin-[INFO]:- or, use -d /data/master/gpseg-1 option for the Greenplum scripts
20120624:10:03:58:020753 gpinitsystem:mdw:gpadmin-[INFO]:- Example gpstate -d /data/master/gpseg-1
20120624:10:03:59:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Script log file = /home/gpadmin/gpAdminLogs/gpinitsystem_20120624.log
20120624:10:03:59:020753 gpinitsystem:mdw:gpadmin-[INFO]:-To remove instance, run gpdeletesystem utility
20120624:10:03:59:020753 gpinitsystem:mdw:gpadmin-[INFO]:-To initialize a Standby Master Segment for this Greenplum instance
20120624:10:03:59:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Review options for gpinitstandby
20120624:10:03:59:020753 gpinitsystem:mdw:gpadmin-[INFO]:-------------------------------------------------------
20120624:10:04:00:020753 gpinitsystem:mdw:gpadmin-[INFO]:-The Master /data/master/gpseg-1/pg_hba.conf post gpinitsystem
20120624:10:04:00:020753 gpinitsystem:mdw:gpadmin-[INFO]:-has been configured to allow all hosts within this new
20120624:10:04:00:020753 gpinitsystem:mdw:gpadmin-[INFO]:-array to intercommunicate. Any hosts external to this
20120624:10:04:00:020753 gpinitsystem:mdw:gpadmin-[INFO]:-new array must be explicitly added to this file
20120624:10:04:00:020753 gpinitsystem:mdw:gpadmin-[INFO]:-Refer to the Greenplum Admin support guide which is
20120624:10:04:00:020753 gpinitsystem:mdw:gpadmin-[INFO]:-located in the /data/greenplum-db/./docs directory
20120624:10:04:01:020753 gpinitsystem:mdw:gpadmin-[INFO]:-------------------------------------------------------
[gpadmin@mdw gpconfigs]$
[gpadmin@mdw gpconfigs]$
1.11 安装完成
了解一下空间变化情况:
[gpadmin@mdw ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 8.6G 2.3G 5.9G 28% /
/dev/sda5 14G 610M 13G 5% /data
/dev/sda1 99M 18M 77M 19% /boot
登录到刚刚创建的hcb_bi库里面看看。
[gpadmin@mdw gpconfigs]$ psql -d hcb_bi
psql (8.2.15)
Type "help" for help.
hcb_bi=# select current_timestamp;
now
2012-06-24 10:08:12.691593+08
(1 row)
hcb_bi=#
hcb_bi=# \q
现在可以查看安装完成之后个分区的空间变化:
执行:df -h
1.12 测试新装数据库
执行gpstop –a 关闭gp
执行gpstart –a 启动gp