摘要:下安裝配置文檔一系統(tǒng)要求系統(tǒng)版本要求根據(jù)官方文檔支持以下幾種系統(tǒng)文件系統(tǒng)要求數(shù)據(jù)存儲(chǔ)目錄為文件系統(tǒng)二下安裝服務(wù)器列表主節(jié)點(diǎn)數(shù)據(jù)節(jié)點(diǎn)數(shù)據(jù)節(jié)點(diǎn)主節(jié)點(diǎn)切換備用節(jié)點(diǎn)修改系統(tǒng)配置項(xiàng)關(guān)閉關(guān)閉防火墻修改內(nèi)核配置參數(shù)并執(zhí)行使之生
centos7.3下 greenplum-db 安裝、配置文檔
一.系統(tǒng)要求1.系統(tǒng)版本要求:
根據(jù)官方文檔: greenplumd-b支持以下幾種linux系統(tǒng):
SUSE Linux Enterprise Server 64-bit 12 SP2 or SP3, with kernel 4.4.73-5.1 or newer SUSE Linux Enterprise Server 64-bit 11 SP4 CentOS 64-bit 6.x or 7.x Red Hat Enterprise Linux (RHEL) 64-bit 6.x or 7.x
2.文件系統(tǒng)要求:
數(shù)據(jù)存儲(chǔ)目錄為 xfs文件系統(tǒng)
gp服務(wù)器列表
144.131.252.198 mdw master 主節(jié)點(diǎn) 144.131.252.199 sdw1-1 數(shù)據(jù)節(jié)點(diǎn)1 144.131.252.144 sdw2-1 數(shù)據(jù)節(jié)點(diǎn)2 144.131.252.195 sdw3-1 主節(jié)點(diǎn)切換備用節(jié)點(diǎn)
1.修改系統(tǒng)配置項(xiàng)
1.1 關(guān)閉SELINUX
vi /etc/selinux/config
SELINUX=disabled
1.2 關(guān)閉防火墻
systemctl status firewalld systemctl stop firewalld.service systemctl disable firewalld.service iptable -L -n
1.3
修改內(nèi)核配置參數(shù),并執(zhí)行 sysctl -p使之生效
vi /etc/sysctl.conf
kernel.shmmax = 500000000 kernel.shmmni = 4096 kernel.shmall = 4000000000 kernel.sem = 2000 4096000 2000 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
1.4
vi /etc/security/limits.conf
* soft nofile 65536 * hard nofile 65536 * soft nproc 131072 * hard nproc 131072
1.5
配置集群中各節(jié)點(diǎn)hosts信息
vi /etc/hosts
144.131.252.198 mdw # master node 144.131.252.199 sdw1-1 # segment node 1 144.131.252.144 sdw2-1 # segment node 2 144.131.252.195 sdw3-1 # segment node 3
2 安裝greenplum-db
2.1 從https://network.pivotal.io/pr...
greenplum-db-5.4.0-rhel7-x86_64.rpm
greenplum-cc-web-3.3.1-LINUX-x86_64.zip
拷貝至mdw(144.131.252.198)主節(jié)點(diǎn)/opt目錄下
執(zhí)行
tar -xzvf greenplum-cc-web-3.3.1-LINUX-x86_64.zip rpm -ivh greenplum-db-5.4.0-rhel7-x86_64.rpm unzip greenplum-db-5.4.0-rhel7-x86_64.zip ./greenplum-db-5.4.0-rhel7-x86_64.bin
2.2 按照提示輸入安裝目錄
/opt/greenplum-db
執(zhí)行
./greenplum-cc-web-3.3.1-LINUX-x86_64.bin
按照提示輸入安裝目錄
/opt/greenplum-cc-web
解壓完成后創(chuàng)建gpadmin用戶(hù)和組,用來(lái)管理greenplum-db
groupadd gpadmin # 創(chuàng)建分組 useradd gpadmin -g gpadmin # 創(chuàng)建用戶(hù)并分配組 passwd gpadmin # 為gpadmin分配密碼 cd /opt/greenplum-db chown -R gpadmin:gpadmin greenplum-db/ chown -R gpadmin:gpadmin greenplum-cc-web/
2.3 切換到gpadmin用戶(hù)下:
su - gpadmin mkdir -p /opt/greenplum-db/gpconfigs cd /opt/greenplum-db/gpconfigs
創(chuàng)建配置文件
vim hostfile_exkeys
mdw sdw1-1 sdw2-1 sdw3-1
vi hostfile
sdw1-1 sdw2-1 sdw3-1
2.4 在gpadmin用戶(hù)下添加環(huán)境變量
vi ~/.bashrc
#添加以下內(nèi)容 export LD_LIBRARY_PATH=$GPHOME/lib export MASTER_DATA_DIRECTORY=/home/gpadmin/gpdata/master/gpseg-1 . /opt/greenplum-db/greenplum_path.sh . /opt/greenplum-cc-web/gpcc_path.sh
source ~/.bashrc
切換到root用戶(hù)下,導(dǎo)出環(huán)境變量
su - root vi ~/.bashrc
#添加以下內(nèi)容 export LD_LIBRARY_PATH=$GPHOME/lib export MASTER_DATA_DIRECTORY=/home/gpadmin/gpdata/master/gpseg-1 . /opt/greenplum-db/greenplum_path.sh . /opt/greenplum-cc-web/gpcc_path.sh
執(zhí)行
source ~/.bashrc gpssh-exkeys -f hostfile_exkeys #拷貝mster節(jié)點(diǎn)公鑰至各segment節(jié)點(diǎn) gpseginstall -f /opt/greenplum-db/gpconfigs/hostfile_exkeys -p gpadmin
注:
gpssh-exkeys -f hostfile_exkeys
將會(huì)在master節(jié)點(diǎn)生成公私鑰,并拷貝至hostfile_exkeys各segment節(jié)點(diǎn),實(shí)現(xiàn)后續(xù)無(wú)密鑰登陸
gpseginstall -f /opt/greenplum-db/gpconfigs/hostfile_exkeys -p gpadmin
使用默認(rèn)用戶(hù)名(gpadmin) 、密碼:gpadmin 在各segment節(jié)點(diǎn)安裝Greenplum—Db
2.5 在master及各segment節(jié)點(diǎn)創(chuàng)建數(shù)據(jù)存儲(chǔ)目錄
mkdir /home/gpadmin/gpdata/master cd /home/gpadmin/ chown -R gpadmin:gpadmin gpdata/master gpssh -f /opt/greenplum-db/gpconfigs/hostfile -e "mkdir -p /home/gpadmin/gpdata/data1/primary;mkdir -p /home/gpadmin/gpdata/data2/primary” gpssh -f /opt/greenplum-db/gpconfigs/hostfile -e "mkdir -p /home/gpadmin/gpdata/data1/mirror;mkdir -p /home/gpadmin/gpdata/data2/mirror" gpssh -f /opt/greenplum-db/gpconfigs/hostfile -e "chown -R gpadmin:gpadmin /home/gpadmin/gpdata" gpssh -f /opt/greenplum-db/gpconfigs/hostfile_exkeys -v -e "ntpd"
切換到gpadmin用戶(hù)下,初始化數(shù)據(jù)庫(kù)集群
su - gpadmin cd /opt/greenplum-db/ cp /opt/greenplum-db/docs/cli_help/gpconfigs/gpinitsystem_config /opt/greenplum-db/gpconfigs/gpinitsystem_config vi /opt/greenplum-db/gpconfigs/gpinitsystem_config
###修改以下內(nèi)容 MASTER_HOSTNAME=mdw PORT_BASE=40000 declare -a DATA_DIRECTORY=(/home/gpadmin/gpdata/data1/primary /home/gpadmin/gpdata/data1/primary /home/gpadmin/gpdata/data2/primary /home/gpadmin/gpdata/data2/primary) MASTER_DIRECTORY=/home/gpadmin/gpdata/master MASTER_PORT=5432 MIRROR_PORT_BASE=50000 REPLICATION_PORT_BASE=41000 MIRROR_REPLICATION_PORT_BASE=51000 declare -a MIRROR_DATA_DIRECTORY=(/home/gpadmin/gpdata/data1/mirror /home/gpadmin/gpdata/data1/mirror /home/gpadmin/gpdata/data2/mirror /home/gpadmin/gpdata/data2/mirror) DATABASE_NAME=gpdb MACHINE_LIST_FILE=/opt/greenplum-db/gpconfigs/hostfile
2.6 配置修改完成之后,執(zhí)行以下命令初始化數(shù)據(jù)庫(kù)
gpinitsystem -c gpconfigs/gpinitsystem_config -h gpconfigs/hostfile
按照提示輸入相應(yīng)信息,初始化完成后修改master節(jié)點(diǎn):
vi /home/gpadmin/gpdata/master/gpseg-/pg_hba.conf
#添加以下內(nèi)容(允許172.16網(wǎng)段通過(guò)密碼登陸) host all gpadmin 172.16.1.1/16 md5
psql修改數(shù)據(jù)庫(kù)密碼:
psql -d gpdb gpdb=# alter user gpadmin with password "gpadmin" gpdb=# q 重啟greenplumdb集群
gpstop -a gpstart -a
2.7 啟動(dòng)greenplum-db commond center(gpcc)
gpperfmon_install --enable --port 5432 --password gpadmin
重啟greenplumdb集群,加載gpperfmon_install采集數(shù)據(jù)
gpstop -a gpstart -a
啟動(dòng)web控制臺(tái)界面
gpcmdr --setup
按照提示輸入實(shí)例名、監(jiān)聽(tīng)端口信息等
#Please enter the instance name gpcc #Press ENTER to use instance name gpcc #Is the master host for the Greenplum Database remote? Yy/Nn (default=N) N #What port does the Greenplum Database use? (default=5432) 5432 #Enable kerberos login for this instance? Yy/Nn (default=N) N #What port would you like the new web server to use for this instance? (default=28080) 28080
啟動(dòng)、停止
gpcmdr --start #啟動(dòng) gpcmdr --stop #停止
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/38985.html
摘要:我使用的是安裝查看是否已經(jīng)安裝默認(rèn)安裝了因?yàn)橐恍┟钜盟热缢褂玫氖鞘褂妹畈榭匆幌率欠癜惭b然后查看一下可執(zhí)行文件的位置進(jìn)入到目錄月月月可以看到可執(zhí)行文件指向,又指向也就是說(shuō)命令執(zhí)行的系統(tǒng)預(yù)裝的要安裝的其他版本先執(zhí)行命令 showImg(https://segmentfault.com/img/remote/1460000012923762); 我使用的是 CentOS7.3 安裝...
閱讀 1876·2021-11-25 09:43
閱讀 3705·2021-11-24 10:32
閱讀 1099·2021-10-13 09:39
閱讀 2347·2021-09-10 11:24
閱讀 3363·2021-07-25 21:37
閱讀 3481·2019-08-30 15:56
閱讀 876·2019-08-30 15:44
閱讀 1466·2019-08-30 13:18