Installing from [Greenplum 6.0] 1 starts early adopters minutes

Greenplum currently 6 version currently has iterated a few small version, with the version of the update, continue to have bug is fixed.

Try going to a friend to start a. As the opening years of the first post of a working day, we must start from the "epoch-making" of 6.0. The following relatively simple, there is little basis for a friend, not suitable for installation and deployment (such posts must have been on the Internet a lot, you can own Baidu) Bible.

  • Try to install

Currently Pivotal official is no longer available bloated bin installation package, but by RedHat system more user-friendly way to publish rpm package, download the trial version from the official (commercial authorization is required) directly to perform the installation.

http://www.1994july.club/?p=1470

[gpadmin6@gp1 ~]$ rpm -ivh greenplum-db-6.0.0-rhel7-x86_64.rpm
错误:依赖检测失败:
	apr 被 greenplum-db-6.0.0-1.el7.x86_64 需要
	apr-util 被 greenplum-db-6.0.0-1.el7.x86_64 需要
	bzip2 被 greenplum-db-6.0.0-1.el7.x86_64 需要
	krb5-devel 被 greenplum-db-6.0.0-1.el7.x86_64 需要
	libevent 被 greenplum-db-6.0.0-1.el7.x86_64 需要
	libyaml 被 greenplum-db-6.0.0-1.el7.x86_64 需要
	rsync 被 greenplum-db-6.0.0-1.el7.x86_64 需要

After performing a discovery, the rpm package software automatically detects and prompts rely, did not talk much, self-yum install the corresponding installation package can be, if it is within the network environment, you can find the corresponding manual installation rpm package from the iso or findrpm and other sites.

  • Continue to try to install the update dependencies
[gpadmin6@gp1 ~]$ rpm -ivh greenplum-db-6.0.0-rhel7-x86_64.rpm
错误:can't create 事务 lock on /var/lib/rpm/.rpm.lock (权限不够)
http://www.1994july.club/?p=1468

Being given ah, how is it? ? Because enough authority Haha, you may have discovered, I was gpadmin6 user-installed, then there are two solutions: 1. Install directly to the root 2. gpadmin6 sudo privileges. Of course, the production is recommended to adopt the second, after all root privileges too dangerous.

  • Switch to the root user to continue trying to install
[root@gp1 gpadmin6]# rpm -ivh greenplum-db-6.0.0-rhel7-x86_64.rpm
准备中...                          ################################# [100%]
正在升级/安装...
   1:greenplum-db-6.0.0-1.el7         ###############                   ( 46%)

My hand speed is not so fast, you can not install the interception of 100% of the state, do not prick, as long as a few seconds, the software is installed successfully. Installed by default under / usr / local / directory.

Because of the above root user installation, so really want to use gpadmin6 as an administrator user, you will need your permission software gives gpadmin6. If you are using gpadmin6 installed directly, it would not need to bother myself.

[root@gp1 gpadmin6]# ls -al /usr/local
总用量 0
drwxr-xr-x. 13 root root 177 9月   5 19:26 .
drwxr-xr-x. 13 root root 155 9月   1 21:55 ..
drwxr-xr-x.  2 root root   6 4月  11 2018 bin
drwxr-xr-x.  2 root root   6 4月  11 2018 etc
drwxr-xr-x.  2 root root   6 4月  11 2018 games
lrwxrwxrwx   1 root root  29 1月   2 19:26 greenplum-db -> /usr/local/greenplum-db-6.0.0
drwxr-xr-x  11 root root 187 1月   2 19:26 greenplum-db-6.0.0
[root@gp1 gpadmin6]# chown -Rf gpadmin6:gpadmin /usr/local/greenplum-db*
[root@gp1 gpadmin6]# ls -al /usr/local
http://www.1994july.club/?p=1466 总用量 0 drwxr-xr-x. 13 root root 177 9月 5 19:26 . drwxr-xr-x. 13 root root 155 9月 1 21:55 .. drwxr-xr-x. 2 root root 6 4月 11 2018 bin drwxr-xr-x. 2 root root 6 4月 11 2018 etc drwxr-xr-x. 2 root root 6 4月 11 2018 games lrwxrwxrwx 1 gpadmin6 gpadmin 29 1月 2 19:26 greenplum-db -> /usr/local/greenplum-db-6.0.0 drwxr-xr-x 11 gpadmin6 gpadmin 187 1月 2 19:26 greenplum-db-6.0.0
  • Set gpadmin6 user environment variables

[gpadmin6@gp1 ~]$ cat .bashrc
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi # Uncomment the following line if you don't like systemctl's auto-paging feature: # export SYSTEMD_PAGER= # User specific aliases and functions source /usr/local/greenplum-db/greenplum_path.sh

This environment variable is mainly used to manage the command to take effect, other environmental variables not being configured.

[gpadmin6@gp1 ~]$ gpssh-exkeys -h gp1
[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] retrieving credentials from remote hosts

[STEP 4 of 5] determine common authentication file content

[STEP 5 of 5] copy authentication files to all remote hosts
http://www.1994july.club/?p=1462 [INFO] completed successfully

People used to know everything, do not pull the cluster when set up mutual trust can be tricky oh.

  • Create a data directory

Initialization of the cluster does not automatically create the directory, you need to manually created.

[root@gp1 gpadmin6]# mkdir -p /gpdata/primary
[root@gp1 gpadmin6]# mkdir -p /gpdata/master
[root@gp1 gpadmin6]# chown -Rf gpadmin6:gpadmin /gpdata
  • Configuration initialization file

The main concern here and segment master directory, host name, port number, and database configuration to the other can be ignored.

[gpadmin6@gp1 ~]$ cp /usr/local/greenplum-db/docs/cli_help/gpconfigs/gpinitsystem_config ~
[gpadmin6@gp1 ~]$ vim gpinitsystem_config
[gpadmin6@gp1 ~]$ cat gpinitsystem_config
# FILE NAME: gpinitsystem_config

# Configuration file needed by the gpinitsystem

################################################
#### REQUIRED PARAMETERS
http://www.1994july.club/?p=1460 ################################################ #### Name of this Greenplum system enclosed in quotes. ARRAY_NAME="Greenplum Data Platform" #### Naming convention for utility-generated data directories. SEG_PREFIX=gpseg #### Base number by which primary segment port numbers #### are calculated. PORT_BASE=6000 #### 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=(/gpdata/primary /gpdata/primary) #### OS-configured hostname or IP address of the master host. MASTER_HOSTNAME=gp1
http://www.1994july.club/?p=1458 #### File system location where the master data directory #### will be created. MASTER_DIRECTORY=/gpdata/master #### Port number for the master instance. MASTER_PORT=5432
  • Initialize the database

Here begins to initialize the database, details ignored (meaningless), hostfile file only one host name gp1

[gpadmin6@gp1 ~]$ gpinitsystem -c gpinitsystem_config -h hostfile
  • Last Login early adopters
[gpadmin6@gp1 ~]$ psql -d postgres
psql (9.4.24)
Type "help" for help.

postgres=# create table t1(id serial, name varchar(10)) distributed replicated;
CREATE TABLE
                                            ^
postgres=# insert into t1(name) values('chris'),('yuan'),('jenny'); INSERT 0 3 postgres=# select * from t1; id | name ----+------- 1 | chris 2 | yuan 3 | jenny (3 rows) http://www.1994july.club/?p=1456 postgres=# \q [gpadmin6@gp1 ~]$
  • Replay Share
# 6.0安装明显比之前安装起来更舒服更方便了,熟练工基本1分钟就能完成单机测试环境安装;
# 安装之前会检测一些依赖软件,不至于在安装过程中报错重新去查漏补缺;
# 数据目录还是需要自己处理,要是数据目录也能自动创建就好了(目前机制可能更注重数据的保护,方式误操作磁盘导致机器上其他数据异常丢失?)
# 目前Greenplum 6.0版本已经merge到PostgreSQL 9.4了。
http://www.1994july.club/?p=1454

End~

 

Guess you like

Origin www.cnblogs.com/1994july/p/12142879.html