简单记录一下源码编译时遇到的问题
1.获取源码从github上下载release的代码:https://github.com/greenplum-db/gpdb/releases/tag/5.28.1
2.编译安装将源代码上传到CentOS 7服务器,本次编译不带有gporca,并且指定了安装路径,编译安装属于正常套路,比较简单的3条命令:
tar -xzvf gpdb-5.28.1.tgz cd gpdb-5.28.1 ./configure --prefix=/home/gposs5/gpdb --disable-orca make make install3.初始化及问题解决
1)安装完成后,我们可以查看/home/gposs5/gpdb下面已经存在相应的可执行文件。
[gposs5@centos7 ~]$ ls gpdb bin doc docs etc greenplum_path.sh include lib sbin share
2)此时我们将环境变量文件增加到.bashrc并使其生效:
[gposs5@centos7 ~]$ vim .bashrc [gposs5@centos7 ~]$ 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 /home/gposs5/gpdb/greenplum_path.sh [gposs5@centos7 ~]$ source .bashrc
环境变量生效后,理论上,我们可以直接调用gp的相关命令了,如果没法调用,请检查环境变量是否生效。
3)下面开始交换机器密钥:
[gposs5@centos7 ~]$ gpssh-exkeys -h centos7 Error: unable to import module: No module named paramiko
啊哈,paramiko库不存在,手工安装:
sudo pip install paramiko
再次尝试交换机器密钥:
[gposs5@centos7 ~]$ gpssh-exkeys -h centos7 /usr/lib/python2.7/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release. from cryptography.hazmat.backends import default_backend Error: unable to import module: No module named psutil
啊哈,psutil库不存在,手工安装,注意,psutil这个库安装时有可能需要更新pip和setuptools,我在安装过程中,遇到了以下的问题,经过更新这2个工具才安装成功:
[gposs5@centos7 ~]$ gpssh-exkeys -h centos7
/usr/lib/python2.7/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
from cryptography.hazmat.backends import default_backend
Error: unable to import module: No module named psutil
[parallels@centos7 ~]$ sudo /usr/bin/python2 -m pip install --upgrade pip
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py:47: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
from cryptography import x509
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting pip
Downloading pip-20.2.2-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 19 kB/s
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.0.2
Uninstalling pip-20.0.2:
Successfully uninstalled pip-20.0.2
Successfully installed pip-20.2.2
[parallels@centos7 tmp]$ sudo pip install psutil
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting psutil
Using cached psutil-5.7.2.tar.gz (460 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jvYEp9/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jvYEp9/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-EPLC_9
cwd: /tmp/pip-install-jvYEp9/psutil/
Complete output (3 lines):
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
error in psutil setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
[parallels@centos7 tmp]$ sudo pip install --upgrade setuptools
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting setuptools
Downloading setuptools-44.1.1-py2.py3-none-any.whl (583 kB)
|████████████████████████████████| 583 kB 8.6 kB/s
Installing collected packages: setuptools
Attempting uninstall: setuptools
Found existing installation: setuptools 0.9.8
Uninstalling setuptools-0.9.8:
Successfully uninstalled setuptools-0.9.8
Successfully installed setuptools-44.1.1
[parallels@centos7 tmp]$ sudo pip install psutil
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting psutil
Using cached psutil-5.7.2.tar.gz (460 kB)
Using legacy 'setup.py install' for psutil, since package 'wheel' is not installed.
Installing collected packages: psutil
Running setup.py install for psutil ... done
Successfully installed psutil-5.7.2
安装好上面2个python库后,尝试交换密钥成功:
[gposs5@centos7 ~]$ gpssh-exkeys -h centos7 /usr/lib/python2.7/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release. from cryptography.hazmat.backends import default_backend [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 [STEP 4 of 5] determine common authentication file content [STEP 5 of 5] copy authentication files to all remote hosts [INFO] completed successfully
4)初始化数据库
尝试初始化时,报错如下:
20200908:09:52:00:006117 gpinitsystem:centos7:gposs5-[INFO]:-Removing back out file 20200908:09:52:00:006117 gpinitsystem:centos7:gposs5-[INFO]:-No errors generated from parallel processes 20200908:09:52:00:006117 gpinitsystem:centos7:gposs5-[INFO]:-Restarting the Greenplum instance in production mode /usr/lib/python2.7/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release. from cryptography.hazmat.backends import default_backend Traceback (most recent call last): File "/home/gposs5/gpdb/bin/gpstop", line 9, infrom gppylib.mainUtils import * File "/home/gposs5/gpdb/lib/python/gppylib/mainUtils.py", line 33, in from lockfile.pidlockfile import PIDLockFile, LockTimeout importError: No module named lockfile.pidlockfile /usr/lib/python2.7/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release. from cryptography.hazmat.backends import default_backend Traceback (most recent call last): File "/home/gposs5/gpdb/bin/gpstart", line 12, in from gppylib.mainUtils import * File "/home/gposs5/gpdb/lib/python/gppylib/mainUtils.py", line 33, in from lockfile.pidlockfile import PIDLockFile, LockTimeout importError: No module named lockfile.pidlockfile
安装lockfile库:
[parallels@centos7 ~]$ sudo pip install lockfile [sudo] parallels 的密码: DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Collecting lockfile Downloading lockfile-0.12.2-py2.py3-none-any.whl (13 kB) Installing collected packages: lockfile Successfully installed lockfile-0.12.2
尝试重新初始化数据库:
rm -rf ../GPData/master/* rm -rf ../GPData/primary/* [gposs5@centos7 conf]$ rm -rf /tmp/.s.PGSQL.5432* [gposs5@centos7 conf]$ ps -ef | grep postgres gposs5 7325 1 0 09:51 pts/0 00:00:00 /home/gposs5/gpdb/bin/postgres -D /home/gposs5/GPData/master/gpsne-1 -i -p 5432 -c gp_role=utility -M master --gp_dbid=1 --gp_contentid=-1 --gp_num_contents_in_cluster=0 -m gposs5 7326 7325 0 09:51 ? 00:00:00 postgres: 5432, logger process gposs5 7329 7325 0 09:51 ? 00:00:00 postgres: 5432, stats collector process gposs5 7330 7325 0 09:51 ? 00:00:00 postgres: 5432, writer process gposs5 7331 7325 0 09:51 ? 00:00:00 postgres: 5432, checkpointer process gposs5 7332 7325 0 09:51 pts/0 00:00:00 postgres: 5432, sweeper process gposs5 7333 7325 0 09:51 ? 00:00:00 postgres: 5432, wal writer process gposs5 10313 4453 0 09:54 pts/0 00:00:00 grep --color=auto postgres [gposs5@centos7 conf]$ kill -9 7325 [gposs5@centos7 conf]$ gpinitsystem -c gpinitsystem_singlenode -h hostfile_singlenode 20200908:09:54:40:010927 gpinitsystem:centos7:gposs5-[INFO]:-Checking configuration parameters, please wait... 20200908:09:54:40:010927 gpinitsystem:centos7:gposs5-[INFO]:-Reading Greenplum configuration file gpinitsystem_singlenode 20200908:09:54:40:010927 gpinitsystem:centos7:gposs5-[INFO]:-Locale has not been set in gpinitsystem_singlenode, will set to default value 20200908:09:54:40:010927 gpinitsystem:centos7:gposs5-[INFO]:-Locale set to en_US.utf8 20200908:09:54:40:010927 gpinitsystem:centos7:gposs5-[INFO]:-No DATAbase_NAME set, will exit following template1 updates 20200908:09:54:40:010927 gpinitsystem:centos7:gposs5-[INFO]:-MASTER_MAX_ConNECT not set, will set to default value 250 20200908:09:54:40:010927 gpinitsystem:centos7:gposs5-[INFO]:-Detected a single host GPDB array build, reducing value of BATCH_DEFAULT from 60 to 4 20200908:09:54:40:010927 gpinitsystem:centos7:gposs5-[INFO]:-Checking configuration parameters, Completed 20200908:09:54:40:010927 gpinitsystem:centos7:gposs5-[INFO]:-Commencing multi-home checks, please wait... . 20200908:09:54:40:010927 gpinitsystem:centos7:gposs5-[INFO]:-Configuring build for standard array 20200908:09:54:40:010927 gpinitsystem:centos7:gposs5-[INFO]:-Commencing multi-home checks, Completed 20200908:09:54:40:010927 gpinitsystem:centos7:gposs5-[INFO]:-Building primary segment instance array, please wait... . 20200908:09:54:41:010927 gpinitsystem:centos7:gposs5-[INFO]:-Checking Master host 20200908:09:54:41:010927 gpinitsystem:centos7:gposs5-[INFO]:-Checking new segment hosts, please wait... . 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Checking new segment hosts, Completed 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Greenplum Database Creation Parameters 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:--------------------------------------- 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Master Configuration 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:--------------------------------------- 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Master instance name = GPDB SINGLENODE 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Master hostname = centos7 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Master port = 5432 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Master instance dir = /home/gposs5/GPData/master/gpsne-1 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Master LOCALE = en_US.utf8 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Greenplum segment prefix = gpsne 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Master Database = 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Master connections = 250 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Master buffers = 128000kB 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Segment connections = 750 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Segment buffers = 128000kB 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Checkpoint segments = 8 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Encoding = UNICODE 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Postgres param file = Off 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Initdb to be used = /home/gposs5/gpdb/bin/initdb 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-GP_LIBRARY_PATH is = /home/gposs5/gpdb/lib 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-HEAP_CHECKSUM is = on 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-HBA_HOSTNAMES is = 0 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Ulimit check = Passed 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Array host connect type = Single hostname per node 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Master IP address [1] = ::1 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Master IP address [2] = 10.211.55.6 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Master IP address [3] = 192.168.122.1 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Master IP address [4] = fdb2:2c26:f4e4:0:d5a2:332c:f355:9ca0 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Master IP address [5] = fe80::d41a:a6de:73c6:70fd 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Standby Master = Not Configured 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Primary segment # = 1 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Total Database segments = 1 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Trusted shell = ssh 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Number segment hosts = 1 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Mirroring config = OFF 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:---------------------------------------- 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-Greenplum Primary Segment Configuration 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:---------------------------------------- 20200908:09:54:42:010927 gpinitsystem:centos7:gposs5-[INFO]:-centos7 /home/gposs5/GPData/primary/gpsne0 6000 2 0 Continue with Greenplum creation Yy|Nn (default=N): > y 20200908:09:54:44:010927 gpinitsystem:centos7:gposs5-[INFO]:-Building the Master instance database, please wait... 20200908:09:54:46:010927 gpinitsystem:centos7:gposs5-[INFO]:-Starting the Master in admin mode /usr/lib/python2.7/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release. from cryptography.hazmat.backends import default_backend /usr/lib/python2.7/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release. from cryptography.hazmat.backends import default_backend 20200908:09:54:49:010927 gpinitsystem:centos7:gposs5-[INFO]:-Commencing parallel build of primary segment instances 20200908:09:54:49:010927 gpinitsystem:centos7:gposs5-[INFO]:-Spawning parallel processes batch [1], please wait... . 20200908:09:54:49:010927 gpinitsystem:centos7:gposs5-[INFO]:-Waiting for parallel processes batch [1], please wait... .......... 20200908:09:54:59:010927 gpinitsystem:centos7:gposs5-[INFO]:------------------------------------------------ 20200908:09:54:59:010927 gpinitsystem:centos7:gposs5-[INFO]:-Parallel process exit status 20200908:09:54:59:010927 gpinitsystem:centos7:gposs5-[INFO]:------------------------------------------------ 20200908:09:54:59:010927 gpinitsystem:centos7:gposs5-[INFO]:-Total processes marked as completed = 1 20200908:09:54:59:010927 gpinitsystem:centos7:gposs5-[INFO]:-Total processes marked as killed = 0 20200908:09:54:59:010927 gpinitsystem:centos7:gposs5-[INFO]:-Total processes marked as failed = 0 20200908:09:54:59:010927 gpinitsystem:centos7:gposs5-[INFO]:------------------------------------------------ 20200908:09:54:59:010927 gpinitsystem:centos7:gposs5-[INFO]:-Deleting distributed backout files 20200908:09:54:59:010927 gpinitsystem:centos7:gposs5-[INFO]:-Removing back out file 20200908:09:54:59:010927 gpinitsystem:centos7:gposs5-[INFO]:-No errors generated from parallel processes 20200908:09:55:00:010927 gpinitsystem:centos7:gposs5-[INFO]:-Restarting the Greenplum instance in production mode /usr/lib/python2.7/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release. from cryptography.hazmat.backends import default_backend 20200908:09:55:00:013813 gpstop:centos7:gposs5-[INFO]:-Starting gpstop with args: -a -l /home/gposs5/gpAdminLogs -i -m -d /home/gposs5/GPData/master/gpsne-1 20200908:09:55:00:013813 gpstop:centos7:gposs5-[INFO]:-Gathering information and validating the environment... 20200908:09:55:00:013813 gpstop:centos7:gposs5-[INFO]:-Obtaining Greenplum Master catalog information 20200908:09:55:00:013813 gpstop:centos7:gposs5-[INFO]:-Obtaining Segment details from master... 20200908:09:55:00:013813 gpstop:centos7:gposs5-[INFO]:-Greenplum Version: 'postgres (Greenplum Database) 5.0.0 build dev' 20200908:09:55:00:013813 gpstop:centos7:gposs5-[INFO]:-There are 0 connections to the database 20200908:09:55:00:013813 gpstop:centos7:gposs5-[INFO]:-Commencing Master instance shutdown with mode='immediate' 20200908:09:55:00:013813 gpstop:centos7:gposs5-[INFO]:-Master host=centos7 20200908:09:55:00:013813 gpstop:centos7:gposs5-[INFO]:-Commencing Master instance shutdown with mode=immediate 20200908:09:55:00:013813 gpstop:centos7:gposs5-[INFO]:-Master segment instance directory=/home/gposs5/GPData/master/gpsne-1 20200908:09:55:01:013813 gpstop:centos7:gposs5-[INFO]:-Attempting forceful termination of any leftover master process 20200908:09:55:01:013813 gpstop:centos7:gposs5-[INFO]:-Terminating processes for segment /home/gposs5/GPData/master/gpsne-1 /usr/lib/python2.7/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release. from cryptography.hazmat.backends import default_backend 20200908:09:55:01:013847 gpstart:centos7:gposs5-[INFO]:-Starting gpstart with args: -a -l /home/gposs5/gpAdminLogs -d /home/gposs5/GPData/master/gpsne-1 20200908:09:55:01:013847 gpstart:centos7:gposs5-[INFO]:-Gathering information and validating the environment... 20200908:09:55:01:013847 gpstart:centos7:gposs5-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 5.0.0 build dev' 20200908:09:55:01:013847 gpstart:centos7:gposs5-[INFO]:-Greenplum Catalog Version: '301705051' 20200908:09:55:01:013847 gpstart:centos7:gposs5-[INFO]:-Starting Master instance in admin mode 20200908:09:55:02:013847 gpstart:centos7:gposs5-[INFO]:-Obtaining Greenplum Master catalog information 20200908:09:55:02:013847 gpstart:centos7:gposs5-[INFO]:-Obtaining Segment details from master... 20200908:09:55:02:013847 gpstart:centos7:gposs5-[INFO]:-Setting new master era 20200908:09:55:02:013847 gpstart:centos7:gposs5-[INFO]:-Master Started... 20200908:09:55:02:013847 gpstart:centos7:gposs5-[INFO]:-Shutting down master 20200908:09:55:03:013847 gpstart:centos7:gposs5-[INFO]:-Commencing parallel segment instance startup, please wait... .. 20200908:09:55:05:013847 gpstart:centos7:gposs5-[INFO]:-Process results... 20200908:09:55:05:013847 gpstart:centos7:gposs5-[INFO]:----------------------------------------------------- 20200908:09:55:05:013847 gpstart:centos7:gposs5-[INFO]:- Successful segment starts = 1 20200908:09:55:05:013847 gpstart:centos7:gposs5-[INFO]:- Failed segment starts = 0 20200908:09:55:05:013847 gpstart:centos7:gposs5-[INFO]:- Skipped segment starts (segments are marked down in configuration) = 0 20200908:09:55:05:013847 gpstart:centos7:gposs5-[INFO]:----------------------------------------------------- 20200908:09:55:05:013847 gpstart:centos7:gposs5-[INFO]:-Successfully started 1 of 1 segment instances 20200908:09:55:05:013847 gpstart:centos7:gposs5-[INFO]:----------------------------------------------------- 20200908:09:55:05:013847 gpstart:centos7:gposs5-[INFO]:-Starting Master instance centos7 directory /home/gposs5/GPData/master/gpsne-1 20200908:09:55:06:013847 gpstart:centos7:gposs5-[INFO]:-Command pg_ctl reports Master centos7 instance active 20200908:09:55:06:013847 gpstart:centos7:gposs5-[INFO]:-No standby master configured. skipping... 20200908:09:55:06:013847 gpstart:centos7:gposs5-[INFO]:-Database successfully started 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-Completed restart of Greenplum instance in production mode 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-Scanning utility log file for any warning messages 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[WARN]:-******************************************************* 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[WARN]:-Scan of log file indicates that some warnings or errors 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[WARN]:-were generated during the array creation 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-Please review contents of log file 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-/home/gposs5/gpAdminLogs/gpinitsystem_20200908.log 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-To determine level of criticality 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-These messages could be from a previous run of the utility 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-that was called today! 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[WARN]:-******************************************************* 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-Greenplum Database instance successfully created 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:------------------------------------------------------- 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-To complete the environment configuration, please 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-update gposs5 .bashrc file with the following 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-1. Ensure that the greenplum_path.sh file is sourced 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-2. Add "export MASTER_DATA_DIRECTORY=/home/gposs5/GPData/master/gpsne-1" 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:- to access the Greenplum scripts for this instance: 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:- or, use -d /home/gposs5/GPData/master/gpsne-1 option for the Greenplum scripts 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:- Example gpstate -d /home/gposs5/GPData/master/gpsne-1 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-script log file = /home/gposs5/gpAdminLogs/gpinitsystem_20200908.log 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-To remove instance, run gpdeletesystem utility 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-To initialize a Standby Master Segment for this Greenplum instance 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-Review options for gpinitstandby 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:------------------------------------------------------- 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-The Master /home/gposs5/GPData/master/gpsne-1/pg_hba.conf post gpinitsystem 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-has been configured to allow all hosts within this new 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-array to intercommunicate. Any hosts external to this 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-new array must be explicitly added to this file 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-Refer to the Greenplum Admin support guide which is 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:-located in the /home/gposs5/gpdb/docs directory 20200908:09:55:06:010927 gpinitsystem:centos7:gposs5-[INFO]:------------------------------------------------------- [gposs5@centos7 conf]$ psql psql: FATAL: database "gposs5" does not exist [gposs5@centos7 conf]$ psql -d postgres psql (8.3.23) Type "help" for help. postgres=# create table t1(id int); NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'id' as the Greenplum Database data distribution key for this table. HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew. CREATE TABLE postgres=# insert into t1 select generate_series(1,100); INSERT 0 100 postgres=#
至此,整个安装完成。
从这个盲安的过程可以感觉到,现在GPOSS不会自带python库,采用的是操作系统的,这就要求我们提前安装好所需的python库环境,在本篇文章中,所需要的有paramiko、psutil和lockfile 3个,但是实际上预置条件还有很多,比如jinja2,需要参考不同平台的Readme文件,例如如下文件CentOS.Readme,提前准备好需要的条件,防止安装过程异常中止:
For CentOS: Install Dependencies ./README.CentOS.bash If you want to link cmake3 to cmake, run: sudo ln -sf ../../bin/cmake3 /usr/local/bin/cmake Make sure that you add /usr/local/lib and /usr/local/lib64 to /etc/ld.so.conf, then run command ldconfig. If you want to install and use gcc-6 by default, run: sudo yum install -y centos-release-scl sudo yum install -y devtoolset-6-toolchain echo 'source scl_source enable devtoolset-6' >> ~/.bashrc
至此结束,更多安装内容请参考:https://github.com/greenplum-db/gpdb



