greenplum+gptext+gpcc安装

2023-03-23 00:00:00 数据库 专区 节点 安装 确认

service NetworkManager stop
systemctl disable NetworkManager
service iptables stop
service ip6tables stop
chkconfig iptables off
chkconfig ip6tables off
systemctl disable firewalld
systemctl stop firewalld

vi /etc/selinux/config

vi /etc/hosts

vi /etc/sysctl.conf
kernel.sem = 500 2048000 200 4096

vi /etc/security/limits.conf
* soft nofile 524288
* hard nofile 524288
* soft nproc 131072
* hard nproc 131072

useradd gpadmin
yum install ed -y

mkdir /data1
chown gpadmin:gpadmin /data1/
mkdir master
mkdir p1 p2


root :yum install -y greenplum-db-6.13.0-rhel7-x86_64.rpm
cd ~
vi all_host
greenplum1
greenplum2
greenplum3


su - gpadmin
source /usr/local/greenplum-db/greenplum_path.sh


mkdir .ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa
ssh-copy-id -i gpadmin@greenplum1
gpssh-exkeys -f all_host

三节点:
vi .bashrc

source /usr/local/greenplum-db/greenplum_path.sh
export MASTER_DATA_DIRECTORY=/data1/master/gpseg-1
export PGPORT=5432
export PGUSER=gpadmin
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH

主节点:
vi seg_host
greenplum2
greenplum3
复制参数文件
cp $GPHOME/docs/cli_help/gpconfigs/gpinitsystem_config /home/gpadmin/gpinitsystem_config
修改
vi gpinitsystem_config
declare -a DATA_DIRECTORY=(/data1/p1 /data1/p2)
MASTER_HOSTNAME=greenplum1
MASTER_DIRECTORY=/data1/master
declare -a MIRROR_DATA_DIRECTORY=(/data1/m1 /data1/m2 )

集群初始化
gpinitsystem -c gpinitsystem_config -h seg_host

创建数据库
createdb -h 127.0.0.1 -p 5432 gpadmin

Standby初始化
gpinitstandby -s greenplum3


---------gptext安装-----------------
三节点:
yum install -y java-1.8.0-openjdk.x86_64
yum -y install nc
yum -y install lsof
主节点:
su - gpadmin
gpssh -f all_host
=>mkdir /usr/local/greenplum-text-3.7.0
=>mkdir /usr/local/greenplum-solr
=> mkdir /data1/gptext
=> exit
vi gptext_install_config
declare -a GPTEXT_HOSTS=(greenplum1 greenplum2 greenplum3)
declare -a DATA_DIRECTORY=(/data1/gptext/p1 /data1/gptext/p2)
JAVA_OPTS="-Xms2048M -Xmx2048M"
declare -a ZOO_HOSTS=(greenplum1 greenplum2 greenplum3)
ZOO_DATA_DIR="/data1/gptext/master/"
安装gptext:
./greenplum-text-3.1.0-rhel6_x86_64.bin -c gptext_install_config
启动gptext
source $GPHOME/greenplum_path.sh
source /usr/local/greenplum-text-3.1.0/greenplum-text_path.sh

gptext-installsql bigdata //在数据库安装gptext实例,bigdata是本地数据库
gptext-start //启动gptext

----------gpcc安装-------------
安装前检查:
gpstate确认greenplum数据库已被安装并正在运行
环境变量MASTER_DATA_DIRECTORY已设置并生效
gpadmin有/usr/local/的写权限
28080为默认的web客户端口,确认未被占用 netstat -aptn| grep 28080
8899为RPC端口,确认未被占用:netstat -aptn| grep 8899
确认依赖包apr-util已被安装:rpm -q apr-util

unzip greenplum-cc-web-6.5.0-gp6-rhel7-x86_64.zip

cd /home/gpadmin/greenplum-cc-web-6.5.0-gp6-rhel7-x86_64
gpccinstall -W
vi .bashrc
source /usr/local/greenplum-cc-6.5.0/gpcc_path.sh
source /usr/local/greenplum-text-3.7.0/greenplum-text_path.sh

vi .pgpass
*:5432:gpperfmon:gpmon:123456
gpcc status
gpcc start

vi /data1/master/gpseg-1/pg_hba.conf
添加
host all all 0.0.0.0/0 trust
cd /usr/local/greenplum-cc/gppkg/
gppkg -i MetricsCollector-6.5.0_gp_6.13.0-rhel7-x86_64.gppkg
gpconfig -c gp_enable_query_metrics -v on
gpconfig -c shared_preload_libraries -v metrics_collector


gpstop

gpstart

添加mirror节点

mkdir /data1/m1
mkdir /data1/m2
master:
gpaddmirrors -o ./addmirror
gpaddmirrors -i addmirror
gpstate -m

SELECT * from gp_segment_configuration ;


本文来源:https://blog.csdn.net/Liumh0622/article/details/123197790

相关文章