国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > CentOS > 正文

centos6.6下如何安裝GreenPlum4.3.5.2?

2020-07-08 12:41:47
字體:
來源:轉載
供稿:網友

在GP官網,看不到關于最新GP在Centos上的對應版本,就使用RedHat的版本就好了。

前言:

GP的安裝大致是這樣的,選擇一臺主機作為Master機,其他作為Segment機。由于沒那么多機子,就虛擬機開了三個centos6.6,采用1+2模式。

安裝時候,記住 GP可以先在Master機上裝好,后續通過在Maser機和Segment機間建立互信(gpssh-exkeys)來進行類似遠程安裝,通過 gpssh 就可以登錄到所有機子上,進行你想要的包括建用戶,拷貝安裝好的GP,等等一系列操作。 當然,在安裝前,有的人會配置下 內核參數、限制參數等等,看你需要。因為我虛擬機,硬件基本達不到官網要求,就舍去這步了。

安裝前準備(可選)

1、在Master機的  /etc/sysctl.conf 中添加

[html] view plaincopy

kernel.shmmax = 500000000  kernel.shmmni = 4096  kernel.shmall = 4000000000  kernel.sem = 250 512000 100 2048  kernel.sysrq = 1  kernel.core_uses_pid = 1  kernel.msgmnb = 65536  kernel.msgmax = 65536  kernel.msgmni = 2048  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.ip_local_port_range = 1025 65535  net.core.netdev_max_backlog = 10000  net.core.rmem_max = 2097152  net.core.wmem_max = 2097152  vm.overcommit_memory = 2  

重啟下機子或者 sysctl -p 生效

2、在Master機  /etc/security/limits.conf 添加

[html] view plaincopy

* soft nofile 65536  * hard nofile 65536  * soft nproc 131072  * hard nproc 131072  

!!! 注意,對于RedHat 6.x和Centos6.x的機子,在/etc/security/limits.d/90-nproc.conf  的參數會覆蓋上述文件參數。如果這兩個文件都設置參數,保證參數在90-nproc.conf設置好了。

3、關閉防火墻

chkconfig iptables off  ;//永久關閉,重啟后不啟動

service iptables stop ;//重啟后會啟動 ,用service iptables status檢查狀態。

開始GP安裝

1、在Master上安裝GP,root權限

將下載好的 greenplum-db-4.3.5.2-build-1-RHEL5-x86_64.zip 放到一個目錄下,解壓(unzip),得到一個ReadMe和.bin文件,默認GP是裝到 /usr/local/greenplum下的,其實裝哪里都可以,這邊我們裝到 /opt/greenplum/  下。

執行 bin文件,解壓目錄下  ./ greenplum-db-4.3.5.2-build-1-RHEL5-x86_64.bin

一路空格鍵下去,直到叫你輸 yes|no ,打yes

選安裝目錄,將你要安裝的目錄輸入,這里 /opt/greenplum/greenplum-db-4.3.5.2

再一路yes下去就安裝好了,很快。

2、習慣先在Master機上建個 負責GP數據庫的用戶 gpadmin,后續segment機的用戶 gpadmin 再通過 gpssh添加

一般一開始是沒gpadmin用戶的,直接新建

groupadd -g 530 gpadmin

useradd -g 530 -u 530 -m -d /home/gpadmin -s /bin/bash gpadmin

passwd gpadmin ;添加密碼

對GP安裝文件夾修改權限

chown -R gpadmin:gpadmin /home/gpadmin

chown -R gpadmin:gpadmin /opt/greenplum

將GP安裝目錄下的一個環境變量文件添加到用戶中。

source /opt/greenplum/greenplum-db/greenplum_path.sh ;/opt/greenplum/greenplum-db是/opt/greenplum/greenplum-db-4.3.5.2的鏈接,沒有就自己鏈接一個 ln -s /opt/greenplum/greenplum-db-4.3.5.2  /opt/greenplum/greenplum-db

3、建立主機間的互信

首先,在Master機上,編輯 /etc/hosts文件,

將Master機和segment機的Ip ,hostname輸入。

# /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.127.136 mdw  #master機

192.168.127.137 sdw1 #segment機

192.168.127.138 sdw2 #segment機

其次,在某個目錄下 如 /var 下建一個保護所有主機hostname的文件hostlists(名字隨便取)和含segment機hostname的seg_hosts。

/var/hostlists:

mdw

sdw1

sdw2

/var/seg_hosts

sdw1

sdw2

開始建立互信

gpssh-exkeys -f /var/hostlists

[root@localhost ~]$ gpssh-exkeys -f /var/hostlists 

[STEP 1 of 5] create local ID and authorize on local host

  ... /home/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] authorize current user on remote hosts

  ... send to mdw

  ... send to sdw1

  ***

  *** Enter password for sdw1: 

[STEP 4 of 5] determine common authentication file content

[STEP 5 of 5] copy authentication files to all remote hosts

  ... finished key exchange with mdw

  ... finished key exchange with sdw1

[INFO] completed successfully

注意:如果提示 沒有秘鑰就   ssh-keygen -t rsa ; ssh-add /root/.ssh/id_rsa 。 就可以得到秘鑰。   如果執行 ssd-add 出現,Could not open a connection to your authentication agent ,則執行 ssh-agent bash. 即可。

建立互信后,就可以通過 gpssh -f /var/seg_hosts 訪問所有的機子了。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 濮阳县| 建阳市| 芒康县| 西昌市| 通许县| 赤城县| 鄯善县| 嘉禾县| 南部县| 保德县| 南丰县| 淮安市| 浦北县| 璧山县| 两当县| 南投县| 视频| 本溪市| 军事| 丹巴县| 仙游县| 新绛县| 南通市| 股票| 禹城市| 灵丘县| 海兴县| 衡山县| SHOW| 合山市| 马龙县| 望江县| 休宁县| 娄烦县| 辛集市| 深州市| 榆中县| 江都市| 江城| 获嘉县| 呼玛县|