1.GREENPLUM的安裝和部署

GREENPLUM的安裝和部署

在虛擬機(jī)上安裝greenplum:
1.操作系統(tǒng)redhat 2.6.18-53.el5xen
2.安裝介質(zhì) greenplum-db-4.2.2.0-build-3-RHEL5-i386.zip
3.準(zhǔn)備單機(jī)上單機(jī)版安裝赊级,安裝一個(gè)master節(jié)點(diǎn)押框,并安裝兩個(gè)segment
4.虛擬機(jī)磁盤空間情況:

[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.因?yàn)間reenplum4.1只支持UTF-8字符集,所以在建立安裝用戶的時(shí)候需要把用戶的默認(rèn)字符集設(shè)置為utf-8理逊,greenplum4.2能否支持其他字符集還待證實(shí)橡伞。
(注:greenplum-db-4.1的安裝方法也是一樣的)

1.1 LINUX系統(tǒng)關(guān)閉防火墻
因?yàn)間reenplum集群各個(gè)節(jié)點(diǎn)是通過 ssh協(xié)議來互相訪問的,所以需要關(guān)閉防火墻晋被。

.3.1.1可以在安裝linux的過程中關(guān)閉掉兑徘,
要關(guān)閉防護(hù)墻,安裝LINUX的時(shí)候可以在firewall選項(xiàng)選擇:disabled

這個(gè)玩意也關(guān)掉:

.3.1.2對(duì)已經(jīng)安裝好的linux使用以下方法來關(guān)閉
關(guān)閉SELinux的方法:
1羡洛、修改/etc/selinux/config文件中的SELINUX="" 為 disabled 挂脑,然后重啟。
2欲侮、使用命令setenforce 0 崭闲,不需要重啟。
注:
setenforce 1 是設(shè)置SELinux 成為enforcing模式
setenforce 0 是設(shè)置SELinux 成為permissive模式
1.2 編輯/etc/sysctl.conf 和/etc/security/limits.conf
.3.2.1編輯sysctl.conf修改或添加系統(tǒng)參數(shù)
使用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修改或添加系統(tǒng)參數(shù)
使用root用戶編輯:

vi /etc/security/limits.conf

  • soft nofile 65536
  • hard nofile 65536
  • soft nproc 131072
  • hard nproc 131072

1.3 修改主節(jié)點(diǎn)/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 創(chuàng)建gpadmin用戶(greenplum默認(rèn)的超級(jí)用戶)
使用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下創(chuàng)建master威蕉、dbseg1和dbseg2目錄
su -l gpadmin
cd /data
mkdir master
mkdir dbseg1
mkdir dbseg2

1.5 解壓安裝文件輸入安裝路徑并賦權(quán)給gpadmin
將安裝介質(zhì)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用戶執(zhí)行這個(gè)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
<<--如果這個(gè)目錄不存在的話安裝程序會(huì)詢問是否要?jiǎng)?chuàng)建


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


輸入: yes ,回車


/data/greenplum-db-4.2.2.0 does not exist. <<--是否要?jiǎng)?chuàng)建greenplum-db-4.2.2.0這個(gè)目錄韧涨?
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 <path_to_old_gphome> /data/greenplum-db-4.2.2.0


按回車

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 創(chuàng)建all_host和seg_host文件
進(jìn)入目錄/home/gpadmin
mkdir gpconfigs
cd gpconfigs

vi all_hosts <<--包含master和segment的全部主機(jī)名稱
mdw
sdw1
sdw2

vi all_segs <<--只包含segment的主機(jī)名稱
sdw1
sdw2
1.7 設(shè)置安裝用戶的環(huán)境變量
編輯gpadmin用戶的啟動(dòng)文件,在末尾加入greenplum工具路徑
vi .bash_profile
source /data/greenplum-db-4.2.2.0/greenplum_path.sh

執(zhí)行一下:
source /home/gpadmin/.bash_profile

[gpadmin@mdw gpconfigs]$
編輯/home/gpadmin/.bashrc
添加 export MASTER_DATA_DIRECTORY=/data/master/gpseg-1如孝,
然后執(zhí)行source /home/gpadmin/.bashrc宪哩。

1.8 為安裝用戶設(shè)置各個(gè)節(jié)點(diǎn)的SSH連接
用greenplum的gpssh-exkeys工具為所有master和segment創(chuàng)建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

測(cè)試各個(gè)節(jié)點(diǎn)是否能連通
gpssh -f ./all_hosts <<--單機(jī)版的可以不測(cè)這個(gè)東西

[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
復(fù)制到/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初始化后創(chuàng)建庫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 初始化數(shù)據(jù)庫(即安裝)

用root用戶修改192.168.153.190上 /etc/ssh/ssh_config
編輯 GSSAPIAuthentication 為no

用gpadin用戶執(zhí)行初始化greenplum系統(tǒng)的配置文件
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

登錄到剛剛創(chuàng)建的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
現(xiàn)在可以查看安裝完成之后個(gè)分區(qū)的空間變化:
執(zhí)行:df -h
1.12 測(cè)試新裝數(shù)據(jù)庫
執(zhí)行g(shù)pstop –a 關(guān)閉gp
執(zhí)行g(shù)pstart –a 啟動(dòng)gp

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市但荤,隨后出現(xiàn)的幾起案子罗岖,更是在濱河造成了極大的恐慌,老刑警劉巖腹躁,帶你破解...
    沈念sama閱讀 210,914評(píng)論 6 490
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件桑包,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡纺非,警方通過查閱死者的電腦和手機(jī)哑了,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 89,935評(píng)論 2 383
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來烧颖,“玉大人弱左,你說我怎么就攤上這事】换矗” “怎么了拆火?”我有些...
    開封第一講書人閱讀 156,531評(píng)論 0 345
  • 文/不壞的土叔 我叫張陵,是天一觀的道長涂圆。 經(jīng)常有香客問我们镜,道長,這世上最難降的妖魔是什么润歉? 我笑而不...
    開封第一講書人閱讀 56,309評(píng)論 1 282
  • 正文 為了忘掉前任模狭,我火速辦了婚禮,結(jié)果婚禮上踩衩,老公的妹妹穿的比我還像新娘嚼鹉。我一直安慰自己,他們只是感情好驱富,可當(dāng)我...
    茶點(diǎn)故事閱讀 65,381評(píng)論 5 384
  • 文/花漫 我一把揭開白布锚赤。 她就那樣靜靜地躺著,像睡著了一般萌朱。 火紅的嫁衣襯著肌膚如雪宴树。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 49,730評(píng)論 1 289
  • 那天晶疼,我揣著相機(jī)與錄音酒贬,去河邊找鬼又憨。 笑死,一個(gè)胖子當(dāng)著我的面吹牛锭吨,可吹牛的內(nèi)容都是我干的蠢莺。 我是一名探鬼主播,決...
    沈念sama閱讀 38,882評(píng)論 3 404
  • 文/蒼蘭香墨 我猛地睜開眼零如,長吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼躏将!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起考蕾,我...
    開封第一講書人閱讀 37,643評(píng)論 0 266
  • 序言:老撾萬榮一對(duì)情侶失蹤祸憋,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后肖卧,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體蚯窥,經(jīng)...
    沈念sama閱讀 44,095評(píng)論 1 303
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,448評(píng)論 2 325
  • 正文 我和宋清朗相戀三年塞帐,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了拦赠。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 38,566評(píng)論 1 339
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡葵姥,死狀恐怖荷鼠,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情榔幸,我是刑警寧澤允乐,帶...
    沈念sama閱讀 34,253評(píng)論 4 328
  • 正文 年R本政府宣布,位于F島的核電站牡辽,受9級(jí)特大地震影響喳篇,放射性物質(zhì)發(fā)生泄漏敞临。R本人自食惡果不足惜态辛,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,829評(píng)論 3 312
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望挺尿。 院中可真熱鬧奏黑,春花似錦、人聲如沸编矾。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,715評(píng)論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽窄俏。三九已至蹂匹,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間凹蜈,已是汗流浹背限寞。 一陣腳步聲響...
    開封第一講書人閱讀 31,945評(píng)論 1 264
  • 我被黑心中介騙來泰國打工忍啸, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人履植。 一個(gè)月前我還...
    沈念sama閱讀 46,248評(píng)論 2 360
  • 正文 我出身青樓,卻偏偏與公主長得像,于是被迫代替她去往敵國和親刽虹。 傳聞我的和親對(duì)象是個(gè)殘疾皇子挚冤,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 43,440評(píng)論 2 348

推薦閱讀更多精彩內(nèi)容