0
Greenplumn安装文档
734
10页
0次
墨值5
cat << EOF >> /etc/sysctl.conf
net.ipv4.ip_forward = 0
kernel.shmmax = 500000000
kernel.shmmni = 4096
kernel.shmall = 4000000000
kernel.sem = 500 1024000 200 4096
kernel.sysrq = 1
kernel.core_uses_pid = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.msgmni = 2048
net.ipv4.tcp_syncookies = 1
net.ipv4.conf.default.accept_source_route = 0
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
vm.swappiness = 10
net.ipv4.tcp_tw_recycle = 1
vm.zone_reclaim_mode = 0
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
vm.dirty_background_ratio = 0
vm.dirty_ratio = 0
vm.dirty_background_bytes = 1610612736
vm.dirty_bytes = 4294967296
net.ipv4.ip_local_reserved_ports=65330
vm.min_free_kbytes = 488001
EOF
cat << EOF >> /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
EOF
Useradd gpadmin
cat << EOF >> /etc/hosts
192.168.18.243 master
192.168.18.244 segment1
EOF
su - gpadmin
touch /home/gpadmin/conf/hostlist
touch /home/gpadmin/conf/seg_hosts
cat << EOF >> /home/gpadmin/conf/hostlist
master
segment1
EOF
cat << EOF >> /home/gpadmin/conf/seg_hosts
segment1
EOF
source /home/gpadmin/greenplum/greenplum_path.sh
gpssh-exkeys -f /home/gpadmin/conf/hostlist
gpscp -f /home/gpadmin/conf/seg_hosts /home/gpadmin/greenplum.tar
=:/home/gpadmin
gpssh -f /home/gpadmin/conf/hostlist
gtar -xvf greenplum.tar
mkdir gpdata
cd gpdata
mkdir gpdatap1 gpdatap2 gpdatam1 gpdatam2 gpmaster
# 初始化实例
gpinitsystem -c conf/gpinitsystem_config -h conf/seg_hosts -s segment3 -S
# 新增节点
cat << EOF >> ~/.bash_profile
source /home/gpadmin/greenplum/greenplum_path.sh
export MASTER_DATA_DIRECTORY=/home/gpadmin/gpdata/gpmaster/gpseg-1
export PGPORT=3433
export PGDATABASE=postgres
EOF
source ~/.bash_profile
touch /home/gpadmin/conf/gpinitsystem_config
cat << EOF > /home/gpadmin/conf/gpinitsystem_config
ARRAY_NAME="Greenplum"
SEG_PREFIX=gpseg
PORT_BASE=33000
declare -a DATA_DIRECTORY=(/home/gpadmin/gpdata/gpdatap1
/home/gpadmin/gpdata/gpdatap2)
MASTER_HOSTNAME=master
MASTER_DIRECTORY=/home/gpadmin/gpdata/gpmaster
MASTER_PORT=3433
TRUSTED_SHELL=/usr/bin/ssh
MIRROR_PORT_BASE=43000
REPLICATION_PORT_BASE=34000
MIRROR_REPLICATION_PORT_BASE=44000
declare -a MIRROR_DATA_DIRECTORY=(/home/gpadmin/gpdata/gpdatam1
/home/gpadmin/gpdata/gpdatam2)
MACHINE_LIST_FILE=/home/gpadmin/conf/seg_hosts
EOF
cat << EOF >> /home/gpadmin/gpdata/gpmaster/gpseg-1/pg_hba.conf
host all all 0.0.0.0/0 md5
EOF
# 创建用户
create user dewei superuser password 'to7CieQuu3aefi';
# 查询用户
\du
# 修改用户
alter role gpadmin with password 'gpadmin';
alter role dewei with password 'to7CieQuu3aefi';
# 退出
\q
# 更新配置
gpstop -u
# 更新变量
gpstate -s
of 10
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜
近期活动
全部
暂无活动,敬请期待...
相关课程
全部