GREENPLUM 5.17 centos 6.10安装步骤是什么
本篇内容介绍了"GREENPLUM 5.17 centos 6.10安装步骤是什么"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
安装介质:
greenplum-db-5.17.0-rhel6-x86_64.zip
有二进制安装包和RPM安装包,我这里选择二进制安装包来安装
机器规划(一个主节点,三个数据节点):
192.168.11.210 mdw192.168.11.211 sdw1192.168.11.212 sdw2192.168.11.213 sdw3
1,禁用防火墙和selinux
service iptables stopchkconfig iptables offvi /etc/selinux/configselinux=disabled
2,配置内核参数
配置内核参数文件:
vi /etc/sysctl.confkernel.shmmax = 500000000kernel.shmmni = 4096kernel.shmall = 4000000000kernel.sem = 500 1024000 200 4096kernel.sysrq = 1kernel.core_uses_pid = 1kernel.msgmnb = 65536kernel.msgmax = 65536kernel.msgmni = 2048net.ipv4.tcp_syncookies = 1net.ipv4.conf.default.accept_source_route = 0net.ipv4.tcp_tw_recycle = 1net.ipv4.tcp_max_syn_backlog = 4096net.ipv4.conf.all.arp_filter = 1net.ipv4.ip_local_port_range = 10000 65535net.core.netdev_max_backlog = 10000net.core.rmem_max = 2097152net.core.wmem_max = 2097152vm.overcommit_memory = 2vm.swappiness = 10vm.dirty_expire_centisecs = 500vm.dirty_writeback_centisecs = 100vm.dirty_background_ratio = 0vm.dirty_ratio=0vm.dirty_background_bytes = 1610612736vm.dirty_bytes = 4294967296
执行sysctl -p使内核参数生效
3,配置资源限制参数
vi /etc/security/limits.conf* soft nofile 65536* hard nofile 65536* soft nproc 131072* hard nproc 131072
4,文件系统格式
文件系统格式推荐使用XFS
5,配置磁盘文件预读参数
推荐配置为16384
获取当前值:/sbin/blockdev --getra /dev/sda
设置新值:/sbin/blockdev --setra 16384 /dev/sda
6,配置磁盘I/O调度策略
推荐设置成deadline模式,有两种设置方法
方法一:
echo deadline /sys/block/sda/queue/scheduler
重启之后失效,可以把上面命令配置到环境变量或者rc.local里面使之启动生效
方法二(永久):
在grub.conf里面配置elevator=deadline:
vi /etc/grub.confkernel /vmlinuz-2.6.32-754.11.1.el6.x86_64 ro root=UUID=39773d5f-aa30-4e9c-aca4-b8f41a865397 elevator=deadline rd_NO_LUKS rd_NO_LVM.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
7,禁用THP(透明大页)
grub.conf里面添加transparent_hugepage=never:
vi /etc/grub.confkernel /vmlinuz-2.6.32-754.11.1.el6.x86_64 ro root=UUID=707d5027-2cc0-4111-9efc-bddc1cc4fe5d elevator=deadline rd_NO_LUKS rd_NO_LVM.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet transparent_hugepage=never
需要重启生效
8,创建用户和组
groupadd gpadminuseradd gpadmin -g gpadminNew password:Retype new password:
9,安装GPDB
unzip greenplum-db-5.17.0-rhel6-x86_64.zip ./greenplum-db-5.17.0-rhel6-x86_64.bin
交互模式中需要接受license,设置安装路径等,本文安装路径为/home/gpadmin/greenplum
10,创建hostlist文件
创建两个hostlist文件,列出各个节点的主机名(host列出所有机器主机名,seg_host仅列出segment主机名)
vi hostmdwsdw1sdw2sdw3vi seg_hostsdw1sdw2sdw3
11,配置各个节点互信
gpssh-exkeys -f /home/gpadmin/greenplum/host
12,其它节点批量安装GPDB
gpseginstall -f /home/gpadmin/greenplum/host
-确认其他节点安装情况
gpssh -f /home/gpadmin/greenplum/host -e ls -l $GPHOME
13,创建数据存储目录
主节点创建数据目录:
mkdir -p /home/gpadmin/gpdata/master
segment节点批量创建目录
gpssh -f seg_host -e 'mkdir -p /home/gpadmin/gpdata/primary'gpssh -f seg_host -e 'mkdir -p /home/gpadmin/gpdata/mirror'
由于本文是直接安装在家目录下面,不会涉及权限问题,如果安装其它目录下需要配置相应权限
14,配置NTP同步
略
15,配置初始化gpdb参数
复制初始化参数文件到gpdb安装目录
cp /home/gpadmin/greenplum/docs/cli_help/gpconfigs/gpinitsystem_config /home/gpadmin/greenplum
修改gpdb初始化参数文件
vi gpinitsystem_config ARRAY_NAME="Greenplum Data Platform"SEG_PREFIX=gpsegPORT_BASE=6000declare -a DATA_DIRECTORY=(/home/gpadmin/gpdata/primary /home/gpadmin/gpdata/primary /home/gpadmin/gpdata/primary)MASTER_HOSTNAME=mdwMASTER_DIRECTORY=/home/gpadmin/gpdata/masterMASTER_PORT=5432TRUSTED_SHELL=sshCHECK_POINT_SEGMENTS=8ENCODING=UNICODEMIRROR_PORT_BASE=7000REPLICATION_PORT_BASE=8000MIRROR_REPLICATION_PORT_BASE=9000declare -a MIRROR_DATA_DIRECTORY=(/home/gpadmin/gpdata/mirror /home/gpadmin/gpdata/mirror /home/gpadmin/gpdata/mirror)DATABASE_NAME=devinMACHINE_LIST_FILE=/home/gpadmin/greenplum/seg_host
15,初始化gpdb
gpinitsystem -c gpinitsystem_config -h seg_host
其他常用参数
-s 配置standby master
-S spread mirror (默认grouped mirror模式)
16,检查gpdb状态
[gpadmin@mdw ~]$ gpstate20190422:16:26:09:015110 gpstate:mdw:gpadmin-[INFO]:-Starting gpstate with args: 20190422:16:26:09:015110 gpstate:mdw:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.17.0 build commit:fc9a9d4cad8dd4037b9bc07bf837c0b958726103'20190422:16:26:09:015110 gpstate:mdw:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.17.0 build commit:fc9a9d4cad8dd4037b9bc07bf837c0b958726103) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Feb 13 2019 15:26:39'20190422:16:26:09:015110 gpstate:mdw:gpadmin-[INFO]:-Obtaining Segment details from master...20190422:16:26:09:015110 gpstate:mdw:gpadmin-[INFO]:-Gathering data from segments....... 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:-Greenplum instance status summary20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:-----------------------------------------------------20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Master instance = Active20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Master standby = No master standby configured20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total segment instance count from metadata = 1820190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:-----------------------------------------------------20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Primary Segment Status20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:-----------------------------------------------------20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total primary segments = 920190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total primary segment valid (at master) = 920190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total primary segment failures (at master) = 020190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid files missing = 020190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid files found = 920190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid PIDs missing = 020190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid PIDs found = 920190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of /tmp lock files missing = 020190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of /tmp lock files found = 920190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number postmaster processes missing = 020190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number postmaster processes found = 920190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:-----------------------------------------------------20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Mirror Segment Status20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:-----------------------------------------------------20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total mirror segments = 920190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total mirror segment valid (at master) = 920190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total mirror segment failures (at master) = 020190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid files missing = 020190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid files found = 920190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid PIDs missing = 020190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid PIDs found = 920190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of /tmp lock files missing = 020190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of /tmp lock files found = 920190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number postmaster processes missing = 020190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number postmaster processes found = 920190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number mirror segments acting as primary segments = 020190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number mirror segments acting as mirror segments = 920190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:-----------------------------------------------------
"GREENPLUM 5.17 centos 6.10安装步骤是什么"的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注网站,小编将为大家输出更多高质量的实用文章!