说明
- 拿自己的3台虚拟机(1主2从),花了4天时间,参照官方文档,装了一套Greenplum6.10(下载链接:https://pan.baidu.com/s/1_GFVanc64ionI5X28W1A2A
提取码:v42d )。 - 默认情况下,一些文件操作的命令均需要在所有节点、单独执行
1.系统参数配置
1.1 关闭防火墙
-- 以root用户执行
systemctl stop firewalld.service
systemctl disable firewalld.service
-- 查看状态
systemctl status firewalld
1.2 配置hosts文件
-- 添加 mdw、sdw1和sdw2 节点信息
vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.211.3 mdw
192.168.211.4 sdw1
192.168.211.5 sdw2
1.3 配置参数
1.3.1 sysctl.conf
/etc/sysctl.conf
# kernel.shmall = _PHYS_PAGES / 2 # See Shared Memory Pages
kernel.shmall = 197951838
# kernel.shmmax = kernel.shmall * PAGE_SIZE
kernel.shmmax = 810810728448
kernel.shmmni = 4096
vm.overcommit_memory = 2 # See Segment Host Memory
vm.overcommit_ratio = 95 # See Segment Host Memory
net.ipv4.ip_local_port_range = 10000 65535 # See Port Settings
kernel.sem = 500 2048000 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.core.netdev_max_backlog = 10000
net.core.rmem_max = 2097152
net.core.wmem_max = 2097152
vm.swappiness = 10
vm.zone_reclaim_mode = 0
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
vm.dirty_background_ratio = 0 # See System Memory
vm.dirty_ratio = 0
vm.dirty_background_bytes = 1610612736
vm.dirty_bytes = 4294967296
1.3.2 20-nproc.conf
设置OS文件和进程的最大数量
/etc/security/limits.d/20-nproc.conf
# 注意:这里的 * 也是内容
* soft nofile 524288
* hard nofile 524288
* soft nproc 131072
* hard nproc 131072