Greenplum安装(1) – 系统安装部署
2,663 total views, 1 views today
一、安装操作系统
SWAP大小不小于内存容量
1、关闭NetworkManager、iptables、selinux
2、配置/etc/sysctl.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
kernel.shmmax = 500000000 kernel.shmmni = 4096 kernel.shmall = 4000000000 kernel.sem = 250 512000 100 2048 #SEMMSL SEMMNS SEMOPM SEMMNI kernel.sysrq = 1 kernel.core_uses_pid = 1 kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.msgmni = 2048 net.ipv4.tcp_syncookies = 1 net.ipv4.ip_forward = 0 net.ipv4.conf.default.accept_source_route = 0 net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_max_syn_backlog = 4096 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.arp_filter = 1 net.ipv4.conf.all.arp_filter = 1 net.ipv4.ip_local_port_range = 1025 65535 net.core.netdev_max_backlog = 10000 vm.overcommit_memory = 2 |
3、配置/etc/security/limits.conf
1 2 3 4 5 6 7 |
echo ' * soft nofile 65536 * hard nofile 65536 * soft nproc 131072 * hard nproc 131072 * soft core unlimited ' >>/etc/security/limits.conf |
4、对于redhat 6.x系统,还需要将/etc/security/limits.d/90-nproc.conf 中的1024改为131072
1 2 3 |
cat /etc/security/limits.d/90-nproc.conf * soft nproc 131072 #1024->131072 root soft nproc unlimited |
5、建议使用XFS文件系统
6、修改Linux磁盘I/O调度器对磁盘的访问支持不同的策略,默认是CFQ,GP建议修改为deadline(添加elevator=deadline)。
1 2 3 4 5 6 7 8 9 |
# more /boot/grub/menu.lst default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.32-431.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=UUID=8cfb3c97-d390-42e6-bdba-b1c519cb8c72 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet elevator=deadline # elevator=deadline initrd /initramfs-2.6.32-431.el6.x86_64.img |
重启OS,确认修改为deadline
1 2 |
# cat /sys/block/sda/queue/scheduler noop anticipatory [deadline] cfq |
7、每个磁盘设备文件需要配置read-ahead(blockdev)值为65536。 官方文档的推荐值为16384,但译者认为应该为65536更合理,该值设置的是预读扇区数,实际上预读的字节数是blockdev设置除以2,而GP缺省的blocksize为32KB,刚好与65536(32768B/32KB)对应。
1 2 3 |
# more /etc/rc.d/rc.local touch /var/lock/subsys/local blockdev --setra 65536 /dev/sd* #<---new add line |
检查确认
1 2 |
# blockdev --getra /dev/sda 65536 |
8、XFS文件系统设置,不然check OS会报错
修改/etc/fstab配置文件中XFS 如下:
1 |
UUID=910f686d-ed06-45ac-b4a5-12384bc8984d /data xfs rw,noatime,inode64,allocsize=16m 1 2 |
二、网络、系统、权限配置
@all hosts(master+segments)
1、vim /etc/hosts
1 2 3 4 5 |
#BEGIN_GROUP_CUSTOMER 192.168.1.171 gp-m 192.168.1.172 gp-s1 192.168.1.173 gp-s2 #END_GROUP_CUSTOMER |
2、创建用户和用户组
1 2 3 4 5 |
# groupadd -g 530 gpadmin # useradd -g 530 -u 530 -m -d /home/gpadmin -s /bin/bash gpadmin # chown -R gpadmin:gpadmin /home/gpadmin # passwd gpadmin |
至此,操作系统以及安装完毕。Greenplum安装配置请见 《Greenplum安装(2) – Greenplum安装部署》 。
>> 更多关于greenplum安装部署的文章,请点击这里。