service NetworkManager stopsystemctl disable NetworkManagerservice iptables stopservice ip6tables stopchkconfig iptables offchkconfig ip6tables offsystemctl disable firewalldsystemctl stop firewalld
vi /etc/selinux/config
vi /etc/hosts
vi /etc/sysctl.confkernel.sem = 500 2048000 200 4096
vi /etc/security/limits.conf* soft nofile 524288* hard nofile 524288* soft nproc 131072* hard nproc 131072
useradd gpadminyum 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.rpmcd ~vi all_hostgreenplum1greenplum2greenplum3
su - gpadminsource /usr/local/greenplum-db/greenplum_path.sh
mkdir .sshchmod 700 ~/.sshssh-keygen -t rsassh-copy-id -i gpadmin@greenplum1gpssh-exkeys -f all_host
三节点:vi .bashrc
source /usr/local/greenplum-db/greenplum_path.shexport MASTER_DATA_DIRECTORY=/data1/master/gpseg-1export PGPORT=5432export PGUSER=gpadminPATH=$PATH:$HOME/.local/bin:$HOME/binexport PATH
主节点:vi seg_hostgreenplum2greenplum3复制参数文件cp $GPHOME/docs/cli_help/gpconfigs/gpinitsystem_config /home/gpadmin/gpinitsystem_config修改vi gpinitsystem_configdeclare -a DATA_DIRECTORY=(/data1/p1 /data1/p2)MASTER_HOSTNAME=greenplum1MASTER_DIRECTORY=/data1/masterdeclare -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启动gptextsource $GPHOME/greenplum_path.shsource /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 280808899为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_64gpccinstall -Wvi .bashrc source /usr/local/greenplum-cc-6.5.0/gpcc_path.shsource /usr/local/greenplum-text-3.7.0/greenplum-text_path.sh
vi .pgpass*:5432:gpperfmon:gpmon:123456gpcc statusgpcc start
vi /data1/master/gpseg-1/pg_hba.conf添加host all all 0.0.0.0/0 trustcd /usr/local/greenplum-cc/gppkg/gppkg -i MetricsCollector-6.5.0_gp_6.13.0-rhel7-x86_64.gppkggpconfig -c gp_enable_query_metrics -v ongpconfig -c shared_preload_libraries -v metrics_collector
gpstop
gpstart
添加mirror节点
mkdir /data1/m1mkdir /data1/m2master:gpaddmirrors -o ./addmirrorgpaddmirrors -i addmirrorgpstate -m
SELECT * from gp_segment_configuration ;
本文来源:https://blog.csdn.net/Liumh0622/article/details/123197790