【GP6安装配置】 Greenplum6.2.1 安装手记(下)
作者:lianghc
本文分為兩部分
參數配置:【GP6安裝配置】 Greenplum6.2.1 安裝手記(上)?
執行安裝:【GP6安裝配置】 Greenplum6.2.1 安裝手記(下)
目錄
3. 集群軟件安裝
3.1 執行安裝程序
3.2 創建hostfile_exkeys
3.3 集群互信,免密登陸
3.3.1 ?生成密鑰
3.3.3 使用gpssh-exkeys 工具,打通n-n的免密登陸
3.3.4 驗證gpssh
3.4 同步master 配置到各個主機(非官方教程步驟)
3.4.1 批量添加gpadmin用戶
3.4.2 打通gpadmin 用戶免密登錄
3.4.3 批量設置greenplum在gpadmin用戶的環境變量
3.4.4 ?批量復制系統參數到其他節點
3.5 集群節點安裝
3.5.1 模擬gpseginstall 腳本
3.5.2 創建集群數據目錄
3.6 集群性能測試
3.6.1 網絡性能測試
3.6.2 磁盤I/O 性能測試
3.6.3 集群時鐘校驗(非官方步驟)
4. ?集群初始化
4.1 ?編寫初始化配置文件
4.1.1 拷貝配置文件模板
4.1.2 根據需要修改參數
4.2 集群初始化
4.2.1 集群初始化命令參數
4.2.2 執行報錯處理
4.3 初始化完成后續操作
4.3.2 設置環境變量
4.3.3 若刪除重裝,使用gpdeletesystem
4.3.4 配置pg_hba.conf
5 安裝成功后配置
5.1 psql 登陸gp 并設置密碼
5.1.1 登陸到不同節點
5.2 客戶端登陸gp
5.2.1. 配置 pg_hba.conf
5.2.2. 修改postgresql.conf?
5.2.3. 加載修改的文件
3. 集群軟件安裝
參考:https://gpdb.docs.pivotal.io/6-2/install_guide/install_gpdb.html
# 與舊版本差異點
3.1 執行安裝程序
? ? ? ?執行安裝腳本,默認安裝到/usr/local/ 目錄下。
?yum install -y ./greenplum-db-6.2.1-rhel6-x86_64.rpm或者使用rpm 安裝
rpm -ivh greenplum-db-6.2.1-rhel6-x86_64.rpm? ? ? ?本次測試是內網機,無法聯網下載所有的依賴包,也沒有提前外網下載好依賴包。而是等安裝時缺什么,再下載什么。現在缺少 libyaml,下載并上傳至服務器,安裝后再試運行gp安裝程序。libyaml下載地址 http://rpmfind.net/linux/rpm2html/search.php?query=libyaml(x86-64)
[root@mdw gp_install_package]# ?yum install -y ./greenplum-db-6.2.1-rhel6-x86_64.rpm Loaded plugins: product-id, refresh-packagekit, search-disabled-repos, security, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Setting up Install Process Examining ./greenplum-db-6.2.1-rhel6-x86_64.rpm: greenplum-db-6.2.1-1.el6.x86_64 Marking ./greenplum-db-6.2.1-rhel6-x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package greenplum-db.x86_64 0:6.2.1-1.el6 will be installed --> Finished Dependency ResolutionDependencies Resolved=======================================================================================================================================================Package ????????????????????????Arch ?????????????????????Version ??????????????????????????Repository ??????????????????????????????????????????Size ======================================================================================================================================================= Installing:greenplum-db ???????????????????x86_64 ???????????????????6.2.1-1.el6 ??????????????????????/greenplum-db-6.2.1-rhel6-x86_64 ???????????????????493 MTransaction Summary ======================================================================================================================================================= Install ??????1 Package(s)Total size: 493 M Installed size: 493 M Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Warning: RPMDB altered outside of yum.Installing : greenplum-db-6.2.1-1.el6.x86_64 ????????????????????????????????????????????????????????????????????????????????????????????????????1/1Verifying ?: greenplum-db-6.2.1-1.el6.x86_64 ????????????????????????????????????????????????????????????????????????????????????????????????????1/1Installed:greenplum-db.x86_64 0:6.2.1-1.el6Complete!
3.2 創建hostfile_exkeys
在$GPHOME目錄創建兩個host文件(all_host,seg_host),用于后續使用gpssh,gpscp 等腳本host參數文件
all_host : 內容是集群所有主機名或ip,包含master,segment,standby等。
seg_host: 內容是所有 segment主機名或ip
若一臺機器有多網卡,且網卡沒有綁定成bond0模式時,需要將多網卡的ip 或者host都列出來。
修改文件夾權限
[root@mdw greenplum-db]# chown -R gpadmin:gpadmin /usr/local/greenplum*3.3 集群互信,免密登陸
## 與舊版本差異點gp6.x 以前無需3.3.1 ssh-keygen生成密鑰,3.3.2 的ssh-copy-id 步驟,直接gpssh-exkeys -f all_host。
3.3.1 ?生成密鑰
我的Linux還沒有公私鑰對,所以,要先生成一個
[root@mdw greenplum-db]# ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: 88:c0:be:87:6a:c2:40:ed:fd:ab:34:f0:35:60:47:0f root@mdw The key's randomart image is: +--[ RSA 2048]----+ | ??????E ????????| | . ???. o ???????| | ?+ ?o . . ??????| | o o..o. ????????| |. o.o .oS ???????| |. ?+o.. . ???????| |o o .+. ?????????| |.+ .. .. ????????| |+ ???.... ???????| +-----------------+3.3.2 將本機的公鑰復制到各個節點機器的authorized_keys文件中
[root@mdw greenplum-db]# ssh-copy-id sdw1[root@mdw greenplum-db]# ssh-copy-id sdw2
3.3.3 使用gpssh-exkeys 工具,打通n-n的免密登陸
[root@mdw?greenplum-db]# gpssh-exkeys -f all_host
Problem getting hostname for gpzq-sh-mb: [Errno -3] Temporary failure in name resolution
Traceback (most recent call last):File "/usr/local/greenplum-db/./bin/gpssh-exkeys", line 409, in <module>(primary, aliases, ipaddrs) = socket.gethostbyaddr(hostname)
socket.gaierror: [Errno -3] Temporary failure in name resolution
# 沒有做章節( 2.2.1 配置每臺機器host )的內容,導致上述錯誤
[root@gjzq-sh-mb greenplum-db]# hostname mdw
[root@gjzq-sh-mb greenplum-db]# gpssh-exkeys -f all_host
[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] retrieving credentials from 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
3.3.4 驗證gpssh
[root@mdw ~]# source /usr/local/greenplum-db/greenplum_path.sh [root@mdw ~]# gpssh -f /usr/local/greenplum-db/all_host -e 'ls /usr/local/' [ mdw] ls /usr/local/ [ mdw] bin ?games ?????????greenplum-db-6.2.1 ?lib ???libexec ???????sbin ??src [ mdw] etc ?greenplum-db ?include ?????????????lib64 ?openssh-6.5p1 ?share ?ssl [sdw1] ls /usr/local/ [sdw1] bin ?games ???lib ???libexec ????????sbin ??src [sdw1] etc ?include ?lib64 ?openssh-6.5p1 ?share ?ssl [sdw2] ls /usr/local/ [sdw2] bin ?games ???lib ???libexec ????????sbin ??src [sdw2] etc ?include ?lib64 ?openssh-6.5p1 ?share ?ssl3.4 同步master 配置到各個主機(非官方教程步驟)
本步驟非官方教程內容,官方教程在修改系統參數步驟中 就已經把集群所有主機的配置都改成一致的。本文檔中前面修改參數部分,只修改master主機的參數,在本步驟中做集群統一配置。
3.4.1 批量添加gpadmin用戶
[root@mdw greenplum-db]# source greenplum_path.sh [root@mdw greenplum-db]# gpssh -f seg_host -e 'groupadd gpadmin;useradd gpadmin -r -m -g gpadmin;echo "gpadmin" | passwd --stdin gpadmin;' [root@mdw greenplum-db]# gpssh -f seg_host -e 'ls /home/'3.4.2 打通gpadmin 用戶免密登錄
?## 與舊版本差異點 gp6 之前,gpadmin 用戶的 免密登錄步驟由gpseginstall 工具自動處理,gp6 需要人工處理。 [root@mdw greenplum-db-6.2.1]# su - gpadmin [gpadmin@mdw ~]$ source /usr/local/greenplum-db/greenplum_path.sh [gpadmin@mdw ~]$ ssh-keygen [gpadmin@mdw ~]$ ssh-copy-id sdw1 [gpadmin@mdw ~]$ ssh-copy-id sdw2 [gpadmin@mdw ~]$ gpssh-exkeys -f /usr/local/greenplum-db/all_host3.4.3 批量設置greenplum在gpadmin用戶的環境變量
添加gp的安裝目錄,和話環境信息到 用戶的環境變量中。
編輯 .bash_profile
編輯 .bashrc
cat >> /home/gpadmin/.bashrc << EOF source /usr/local/greenplum-db/greenplum_path.sh EOF環境變量文件分發到其他節點
su - gpadmin source /usr/local/greenplum-db/greenplum_path.sh gpscp -f /usr/local/greenplum-db/seg_host /home/gpadmin/.bash_profile ?gpadmin@=:/home/gpadmin/.bash_profile gpscp -f /usr/local/greenplum-db/seg_host /home/gpadmin/.bashrc gpadmin@=:/home/gpadmin/.bashrc?
3.4.4 ?批量復制系統參數到其他節點
# 示例:
su root
gpscp -f seg_host /etc/hosts ??root@=:/etc/hosts
gpscp -f seg_host /etc/security/limits.conf ??root@=:/etc/security/limits.conf?
gpscp -f seg_host /etc/sysctl.conf ?root@=:/etc/sysctl.conf?
gpscp -f seg_host /etc/security/limits.d/90-nproc.conf ??root@=:/etc/security/limits.d/90-nproc.conf
gpssh -f seg_host -e '/sbin/blockdev --setra 16384 /dev/sda'
gpssh -f seg_host -e 'echo deadline > /sys/block/sda/queue/scheduler'
gpssh -f seg_host -e 'sysctl -p'
gpssh -f seg_host -e 'reboot'
3.5 集群節點安裝
## 與舊版本差異點目前官網缺少這部分說明。 在gp6 之前,有一個工具gpseginstall ,可以安裝各個節點的gp軟件。根據gpseginstall的日志可以分析出,gpseginstall的主要步驟是: 1. 節點上創建gp用戶 (此步驟可略過) 2. 打包主節點安裝目錄 3. scp到各個seg 服務器 4. 解壓,創建軟連接 5. 授權給gpamdin gpseginstall 安裝日志,參考gp5 安裝筆記
3.5.1 模擬gpseginstall 腳本
以下腳本模擬gpseginstall 的主要過程,完成gpsegment的部署
# root 用戶下執行 # 變量設置 link_name='greenplum-db' ???????????????????#軟連接名 binary_dir_location='/usr/local' ???????????#安裝路徑 binary_dir_name='greenplum-db-6.2.1' ???????#安裝目錄 binary_path='/usr/local/greenplum-db-6.2.1' #全目錄# master節點上打包
chown -R gpadmin:gpadmin $binary_path rm -f ${binary_path}.tar; rm -f ${binary_path}.tar.gz cd $binary_dir_location; tar cf ${binary_dir_name}.tar ${binary_dir_name} gzip ${binary_path}.tar# 分發到segment
gpssh -f ${binary_path}/seg_host -e "mkdir -p ${binary_dir_location};rm -rf ${binary_path};rm -rf ${binary_path}.tar;rm -rf ${binary_path}.tar.gz" gpscp -f ${binary_path}/seg_host ${binary_path}.tar.gz root@=:${binary_path}.tar.gz gpssh -f ${binary_path}/seg_host -e "cd ${binary_dir_location};gzip -f -d ${binary_path}.tar.gz;tar xf ${binary_path}.tar" gpssh -f ${binary_path}/seg_host -e "rm -rf ${binary_path}.tar;rm -rf ${binary_path}.tar.gz;rm -f ${binary_dir_location}/${link_name}" gpssh -f ${binary_path}/seg_host -e ln -fs ${binary_dir_location}/${binary_dir_name} ${binary_dir_location}/${link_name} gpssh -f ${binary_path}/seg_host -e "chown -R gpadmin:gpadmin ${binary_dir_location}/${link_name};chown -R gpadmin:gpadmin ${binary_dir_location}/${binary_dir_name}" gpssh -f ${binary_path}/seg_host -e "source ${binary_path}/greenplum_path" gpssh -f ${binary_path}/seg_host -e "cd ${binary_dir_location};ll"3.5.2 創建集群數據目錄
3.5.2.1 創建master 數據目錄
?mkdir -p /opt/greenplum/data/masterchown gpadmin:gpadmin /opt/greenplum/data/masterstandby 數據目錄(本次實驗沒有standby )
使用gpssh 遠程給standby 創建數據目錄
3.5.2.2 創建segment 數據目錄
本次計劃每個主機安裝兩個 segment,兩個mirror.
3.6 集群性能測試
## 與舊版本差異點gp6 取消了gpcheck 工具。目前可校驗的部分是網絡和磁盤IO性能。gpcheck工具可以對gp需要的系統參數,硬件配置進行校驗
詳情參考官網:
https://gpdb.docs.pivotal.io/6-2/install_guide/validate.html#topic1
擴展閱讀:
https://yq.aliyun.com/articles/230896?spm=a2c4e.11155435.0.0.a9756e1eIiHSoH
個人經驗(僅供才考,具體標準 要再找資料):
一般來說磁盤要達到2000M/s
網絡至少1000M/s
3.6.1 網絡性能測試
實驗示例:
[root@mdw local]# ?gpcheckperf -f /usr/local/greenplum-db/seg_host -r N -d /tmp /usr/local/greenplum-db/./bin/gpcheckperf -f /usr/local/greenplum-db/seg_host -r N -d /tmp------------------- -- ?NETPERF TEST -------------------Authorized only. All activity will be monitored and reported NOTICE: -t is deprecated, and has no effect NOTICE: -f is deprecated, and has no effectAuthorized only. All activity will be monitored and reported NOTICE: -t is deprecated, and has no effect NOTICE: -f is deprecated, and has no effect [Warning] netperf failed on sdw2 -> sdw1==================== == ?RESULT 2019-12-18T19:40:30.264321 ==================== Netperf bisection bandwidth test sdw1 -> sdw2 = 2273.930000Summary: sum = 2273.93 MB/sec min = 2273.93 MB/sec max = 2273.93 MB/sec avg = 2273.93 MB/sec median = 2273.93 MB/sec?測試發現 netperf failed on sdw2 -> sdw1。檢查發現是sdw2的hosts沒有配置。
3.6.2 磁盤I/O 性能測試
實驗單機裝兩個seg,但是只有一塊盤,所以測試一個目錄即可,測試月產生32G的數據,需要留有足夠的磁盤空間。
?gpcheckperf -f /usr/local/greenplum-db/seg_host -r ds -D ??-d /opt/greenplum/data1/primary [root@mdw greenplum-db]# ?gpcheckperf -f /usr/local/greenplum-db/seg_host -r ds -D ??-d /opt/greenplum/data1/primary /usr/local/greenplum-db/./bin/gpcheckperf -f /usr/local/greenplum-db/seg_host -r ds -D -d /opt/greenplum/data1/primary -------------------- -- ?DISK WRITE TEST -------------------- -------------------- -- ?DISK READ TEST -------------------- -------------------- -- ?STREAM TEST -------------------- ==================== == ?RESULT 2019-12-18T19:59:06.969229 ====================disk write avg time (sec): 47.34disk write tot bytes: 66904850432disk write tot bandwidth (MB/s): 1411.59disk write min bandwidth (MB/s): 555.60 [sdw2]disk write max bandwidth (MB/s): 855.99 [sdw1]-- per host bandwidth --disk write bandwidth (MB/s): 855.99 [sdw1]disk write bandwidth (MB/s): 555.60 [sdw2]disk read avg time (sec): 87.33disk read tot bytes: 66904850432disk read tot bandwidth (MB/s): 738.54disk read min bandwidth (MB/s): 331.15 [sdw2]disk read max bandwidth (MB/s): 407.39 [sdw1]-- per host bandwidth --disk read bandwidth (MB/s): 407.39 [sdw1]disk read bandwidth (MB/s): 331.15 [sdw2]stream tot bandwidth (MB/s): 12924.30stream min bandwidth (MB/s): 6451.80 [sdw1]stream max bandwidth (MB/s): 6472.50 [sdw2]-- per host bandwidth --stream bandwidth (MB/s): 6451.80 [sdw1]stream bandwidth (MB/s): 6472.50 [sdw2]3.6.3 集群時鐘校驗(非官方步驟)
驗證集群時間,若不一致,需要修改ntp
gpssh -f /usr/local/greenplum-db/all_host -e 'date'
4. ?集群初始化
官方文檔:https://gpdb.docs.pivotal.io/6-2/install_guide/init_gpdb.html
4.1 ?編寫初始化配置文件
4.1.1 拷貝配置文件模板
su - gpadmin mkdir -p /home/gpadmin/gpconfigs cp $GPHOME/docs/cli_help/gpconfigs/gpinitsystem_config /home/gpadmin/gpconfigs/gpinitsystem_config
4.1.2 根據需要修改參數
注意:To specify PORT_BASE, review the port range specified in the net.ipv4.ip_local_port_range parameter in the /etc/sysctl.conf file.
主要修改的參數:
4.2 集群初始化
4.2.1 集群初始化命令參數
執行腳本:
gpinitsystem -c /home/gpadmin/gpconfigs/gpinitsystem_config -h /usr/local/greenplum-db/seg_host -D
4.2.2 執行報錯處理
[gpadmin@mdw gpconfigs]$ gpinitsystem -c /home/gpadmin/gpconfigs/gpinitsystem_config -h /usr/local/greenplum-db/seg_host -D
...
/usr/local/greenplum-db/./bin/gpinitsystem: line 244: /tmp/cluster_tmp_file.8070: Permission denied
/bin/mv: cannot stat `/tmp/cluster_tmp_file.8070': Permission denied
...
20191218:20:22:57:008070 gpinitsystem:mdw:gpadmin-[FATAL]:-Unknown host sdw1: ping: icmp open socket: Operation not permitted
unknown host Script Exiting!
4.2.2.1 Permission denied 錯誤 處理
gpssh -f /usr/local/greenplum-db/all_host -e 'chmod 777 /tmp'4.2.2.2 icmp open socket: Operation not permitted 錯誤處理
gpssh -f /usr/local/greenplum-db/all_host -e 'chmod u+s /bin/ping'4.2.2.3 失敗回退
安裝中途失敗,提示使用 ?bash /home/gpadmin/gpAdminLogs/backout_gpinitsystem_gpadmin_* 回退,執行該腳本即可,例如:
若執行后仍然未清理干凈,可執行一下語句后,再重新安裝:
pg_ctl -D /opt/greenplum/data/master/gpseg-1 stop rm -f /tmp/.s.PGSQL.5432 /tmp/.s.PGSQL.5432.lock rm -Rf /opt/greenplum/data/master/gpseg-1
?4.2.2.4 ping: unknown host gpzq-sh-mb unknown host Script Exiting! 錯誤
請參考:
http://note.youdao.com/noteshare?id=8a72fdf1ec13a1c79b2d795e406b3dd2&sub=313FE99D57C84F2EA498DB6D7B79C7D3
編輯 /home/gpadmin/.gphostcache 文件,為一下內容:
[gpadmin@mdw ~]$ cat .gphostcache
mdw:mdw
sdw1:sdw1
sdw2:sdw2
4.3 初始化完成后續操作
順利初始化完成,會 打印出 Greenplum Database instance successfully created。
日志生成到/home/gpadmin/gpAdminLogs/ 目錄下,命名規則: gpinitsystem_${安裝日期}.log
日志最后部分如下:
仔細閱讀日志最后面的內容,還有幾個步驟需要操作。4.3.1 檢查日志內容
日志中有如下提示:
Scan ?warnings or errors:
?cat /home/gpadmin/gpAdminLogs/gpinitsystem_20191218.log|grep -E -i 'WARN|ERROR]'根據日志內容做相應的調整,使集群性能達到最優。
4.3.2 設置環境變量
編輯gpadmin 用戶的環境變量,增加
source /usr/local/greenplum-db/greenplum_path.sh export MASTER_DATA_DIRECTORY=/opt/greenplum/data/master/gpseg-1除此之外,通常還增加:
export PGPORT=5432 ??????# 根據實際情況填寫 export PGUSER=gpadmin ???# 根據實際情況填寫 export PGDATABASE=gpdw ?# 根據實際情況填寫環境變量詳情參考:https://gpdb.docs.pivotal.io/510/install_guide/env_var_ref.html
前面已經添加過 source /usr/local/greenplum-db/greenplum_path.sh,此處操作如下:
編輯 .bash_profile
su - gpadmin cat >> /home/gpadmin/.bash_profile << EOF export MASTER_DATA_DIRECTORY=/opt/greenplum/data/master/gpseg-1 export PGPORT=5432 export PGUSER=gpadmin export PGDATABASE=gpdw EOF編輯 .bashrc
cat >> /home/gpadmin/.bashrc << EOF export MASTER_DATA_DIRECTORY=/opt/greenplum/data/master/gpseg-1 export PGPORT=5432 export PGUSER=gpadmin export PGDATABASE=gpdw EOF環境變量文件分發到其他節點
gpscp -f /usr/local/greenplum-db/seg_host /home/gpadmin/.bash_profile ?gpadmin@=:/home/gpadmin/.bash_profile gpscp -f /usr/local/greenplum-db/seg_host /home/gpadmin/.bashrc gpadmin@=:/home/gpadmin/.bashrc gpssh -f /usr/local/greenplum-db/all_host -e 'source /home/gpadmin/.bash_profile;source /home/gpadmin/.bashrc;'4.3.3 若刪除重裝,使用gpdeletesystem
安裝完成,出于種種原因,若需要集群刪除重裝,使用 gpdeletesystem ?工具
詳情參考官方文檔:
https://gpdb.docs.pivotal.io/6-2/utility_guide/ref/gpdeletesystem.html#topic1
使用命令:
-d 后面跟 MASTER_DATA_DIRECTORY(master 的數據目錄),會清除master,segment所有的數據目錄。
-f force, 終止所有進程,強制刪除。示例:
刪除完成后再根據自己需要,調整集群初始化配置文件,并重新初始化。
vi /home/gpadmin/gpconfigs/gpinitsystem_config
gpinitsystem -c /home/gpadmin/gpconfigs/gpinitsystem_config -h /usr/local/greenplum-db/seg_host -D
4.3.4 配置pg_hba.conf
根據訪問需要 ,配置pg_hba.conf。
/opt/greenplum/data/master/gpseg-1/pg_hba.conf
詳情參考后文:5.2.1. 配置 pg_hba.conf
5 安裝成功后配置
5.1 psql 登陸gp 并設置密碼
是用psql 登錄gp, 一般命令格式為:
psql -h hostname -p port -d database -U user -W password-h后面接對應的master或者segment主機名
-p后面接master或者segment的端口號
-d后面接數據庫名可將上述參數配置到用戶環境變量中,linux 中使用gpadmin用戶不需要密碼。
psql 登錄,并設置gpadmin用戶密碼示例:
5.1.1 登陸到不同節點
參數示意:
#登陸主節點 [gpadmin@mdw gpconfigs]$ PGOPTIONS='-c gp_session_role=utility' psql -h mdw -p5432 -d postgres#登陸到segment,需要指定segment 端口。 [gpadmin@mdw gpconfigs]$ PGOPTIONS='-c gp_session_role=utility' psql -h sdw1 -p6000 -d postgres5.2 客戶端登陸gp
配置 pg_hba.conf
配置 postgresql.conf
5.2.1. 配置 pg_hba.conf
?參考配置說明:https://blog.csdn.net/yaoqiancuo3276/article/details/80404883
vi /opt/greenplum523/data/master/gpseg-1/pg_hba.conf# TYPE ?DATABASE ???????USER ???????????ADDRESS ????????????????METHOD # "local" is for Unix domain socket connections only # IPv4 local connections: # IPv6 local connections: local ???all ????????gpadmin ????????ident host ????all ????????gpadmin ????????127.0.0.1/28 ???trust host ????all ????????gpadmin ????????172.28.25.204/32 ??????trust host ????all ????????gpadmin ????????0.0.0.0/0 ??md5 ?# 新增規則允許任意ip 密碼登陸 host ????all ????????gpadmin ????????::1/128 ??????trust host ????all ????????gpadmin ????????fe80::250:56ff:fe91:63fc/128 ??????trust local ???replication gpadmin ????????ident host ????replication gpadmin ????????samenet ??????trust5.2.2. 修改postgresql.conf?
postgresql.conf里的監聽地址設置為:
listen_addresses = '*' ??# 允許監聽任意ip gp6.0 默認會設置這個參數為 listen_addresses = '*' ?
5.2.3. 加載修改的文件
gpstop -u?至此,安裝完成。是用客戶端軟件登錄驗證即可。
后續再安裝擴展插件,如gpcc, dblink,madlib 等
總結
以上是生活随笔為你收集整理的【GP6安装配置】 Greenplum6.2.1 安装手记(下)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: indexedDB基本使用(内含案例)
- 下一篇: 中恒达软件测试,天线测试系统-恒达微波.