本篇内容介绍了“GREENPLUM 5.17 centos 6.10安装步骤是什么”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
安装介质:
greenplum-db-5.17.0-rhel6-x86_64.zip
有二进制安装包和RPM安装包,我这里选择二进制安装包来安装
机器规划(一个主节点,三个数据节点):
192.168.11.210 mdw 192.168.11.211 sdw1 192.168.11.212 sdw2 192.168.11.213 sdw3
1,禁用防火墙和selinux
service iptables stop chkconfig iptables off vi /etc/selinux/config selinux=disabled
2,配置内核参数
配置内核参数文件:
vi /etc/sysctl.conf 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_tw_recycle = 1 net.ipv4.tcp_max_syn_backlog = 4096 net.ipv4.conf.all.arp_filter = 1 net.ipv4.ip_local_port_range = 10000 65535 net.core.netdev_max_backlog = 10000 net.core.rmem_max = 2097152 net.core.wmem_max = 2097152 vm.overcommit_memory = 2 vm.swappiness = 10 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
执行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.conf kernel /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.conf kernel /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 gpadmin useradd gpadmin -g gpadmin New password: <changeme> Retype new password: <changeme>
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 host mdw sdw1 sdw2 sdw3 vi seg_host sdw1 sdw2 sdw3
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=gpseg PORT_BASE=6000 declare -a DATA_DIRECTORY=(/home/gpadmin/gpdata/primary /home/gpadmin/gpdata/primary /home/gpadmin/gpdata/primary) MASTER_HOSTNAME=mdw MASTER_DIRECTORY=/home/gpadmin/gpdata/master MASTER_PORT=5432 TRUSTED_SHELL=ssh CHECK_POINT_SEGMENTS=8 ENCODING=UNICODE MIRROR_PORT_BASE=7000 REPLICATION_PORT_BASE=8000 MIRROR_REPLICATION_PORT_BASE=9000 declare -a MIRROR_DATA_DIRECTORY=(/home/gpadmin/gpdata/mirror /home/gpadmin/gpdata/mirror /home/gpadmin/gpdata/mirror) DATABASE_NAME=devin MACHINE_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 ~]$ gpstate 20190422: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 summary 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:----------------------------------------------------- 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Master instance = Active 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Master standby = No master standby configured 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total segment instance count from metadata = 18 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:----------------------------------------------------- 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Primary Segment Status 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:----------------------------------------------------- 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total primary segments = 9 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total primary segment valid (at master) = 9 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total primary segment failures (at master) = 0 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid files missing = 0 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid files found = 9 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid PIDs missing = 0 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid PIDs found = 9 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of /tmp lock files missing = 0 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of /tmp lock files found = 9 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number postmaster processes missing = 0 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number postmaster processes found = 9 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:----------------------------------------------------- 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Mirror Segment Status 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:----------------------------------------------------- 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total mirror segments = 9 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total mirror segment valid (at master) = 9 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total mirror segment failures (at master) = 0 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid files missing = 0 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid files found = 9 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid PIDs missing = 0 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of postmaster.pid PIDs found = 9 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of /tmp lock files missing = 0 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number of /tmp lock files found = 9 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number postmaster processes missing = 0 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number postmaster processes found = 9 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number mirror segments acting as primary segments = 0 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:- Total number mirror segments acting as mirror segments = 9 20190422:16:26:13:015110 gpstate:mdw:gpadmin-[INFO]:-----------------------------------------------------
“GREENPLUM 5.17 centos 6.10安装步骤是什么”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注亿速云网站,小编将为大家输出更多高质量的实用文章!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。