vim /etc/sysctl.conf
kernel.shmmax = 500000000
kernel.shmmni = 4096
kernel.shmall = 4000000000
vim /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
systemctl stop firewalld
systemctl disable firewalld
4、设置selinux为disabledvim /etc/selinux/config
selinux=disabled
groupadd gpadmin (创建用户组gpadmin)
useradd gpadmin -g gpadmin (创建用户gpadmin由gpadmin用户组管理)
passwd gpadmin (修改登录密码)
二、greenplum数据库的安装和部署
rpm -Uvh greenplum-db-5.20.0-rhe16-x86_64.rpm
chown -R gpadmin /usr/local/greenplum-db-<version>
chgrp -R gpadmin /usr/local/greenplum-db-<version>
source /usr/local/greenplum-db-5.20.0/greenplum_path.sh
vim hostfile_exkeys
master
seg1
seg2
gpseginstall -f hostfile_exkeys (关键命令)
source /usr/local/greenplum-db-5.20.0/greenplum_path.sh
gpssh -f hostfile_exkeys -e ls -l $GPHOME
gpssh-exkeys -f hostfile_exkeys
vim /home/gpadmin/gpconfigs/gpinitsystem_config
ARRAY_NAME="Greenplum DW"
SEG_PREFIX=gpseg
PORT_BASE=6000
declare -a DATA_DIRECTORY=(/data1/primary )
MASTER_HOSTNAME=master --(注意是真实的host名)
MASTER_DIRECTORY=/data1/master
MASTER_PORT=5432
TRUSTED SHELL=ssh
CHECK_POINT_SEGMENTS=8
ENCODING=UNICODE
gpssh -f hostfile_exkeys -e mkdir -p /data1/primary
gpssh -f hostfile_exkeys -e chown gpadmin /data1/primary
gpssh -f hostfile_exkeys -e chgrp gpadmin /data1/primary
cd~
gpinitsystem -c gpconfigs/gpinitsystem_config -h gpconfigs/hostfile_gpinitsystem
vim /home/gpadmin/.bash_profile
source /usr/local/greenplum-db-5.20.0/greenplum_path.sh
export MASTER_DATA_DIRECTORY=/data1/gpadmin/master/gpseg-1
export GPPORT=5432
export PGDATABASE=postgres
source /home/gpadmin/.bash_profile
[gpadmin@master ~]$ *psql*
psql (8.3.23)
Type “help” for help.
postgres=# create table demo (id int) distributed by (id);
CREATE TABLE
postgres=# insert into demo values(1);
INSERT 0 1
《行业指标体系白皮书》下载地址:https://www.dtstack.com/resources/1057/?src=bbs
《数据治理行业实践白皮书》下载地址:https://www.dtstack.com/resources/1001/?src=bbs
《数栈V6.0产品白皮书》下载地址:https://www.dtstack.com/resources/1004/?src=bbs
想了解或咨询更多有关袋鼠云大数据产品、行业解决方案、客户案例的朋友,浏览袋鼠云官网:https://www.dtstack.com/?src=bbs
同时,欢迎对大数据开源项目有兴趣的同学加入「袋鼠云开源框架钉钉技术群」,交流最新开源技术信息,群号码:30537511,项目地址:https://github.com/DTStack