greenplum麒麟安装笔记_麒麟系统编译greenplum-程序员宅基地

技术标签: postgresql  

本周尝试在中标麒麟操作系统下安装greenplum。中标麒麟操作系统采用强化的Linux内核,我们首先准备好三台已安装中标麒麟服务版系统的虚拟机。规划他们的IP地址分别为:

Master:10.81.2.20

Segment1:10.81.2.21

Segment2:10.81.2.22

通过查找greenplum的官方网站可知,greenplum支持的操作系统如下:

Red Hat Enterprise Linux 64-bit 7.x (See the following Note.)

Red Hat Enterprise Linux 64-bit 6.x

CentOS 64-bit 7.x

CentOS 64-bit 6.x

Ubuntu 18.04 LTS

Oracle Linux 64-bit 7, using the Red Hat Compatible Kernel (RHCK)

为了验证是否可在麒麟操作系统下安装,我们首先看下麒麟操作系统:

[root@localhost ~]# cat /etc/redhat-release

Red Hat Enterprise Linux Server release 7.2 (Maipo)

[root@localhost ~]# uname -a

Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 26 13:46:27 CST 2015 x86_64 x86_64 x86_64 GNU/Linux

由此可知,麒麟操作系统支持greenplum的安装。

下一步我们需要配置三台主机的静态IP,通过修改/etc/sysconfig/network-scripts/ifcfg-enoXXXX文件,具体修改如下:

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eno16780032

TYPE=Ethernet

BOOTPROTO=static

DEFROUTE=yes

PEERDNS=yes

PEERROUTES=yes

IPV4_FAILURE_FATAL=no

IPV6INIT=yes

IPV6_AUTOCONF=yes

IPV6_DEFROUTE=yes

IPV6_PEERDNS=yes

IPV6_PEERROUTES=yes

IPV6_FAILURE_FATAL=no

NAME=eno16780032

UUID=d1e5a4a9-4a63-4c56-a51d-6cf971293f24

DEVICE=eno16780032

ONBOOT=yes

IPADDR=10.81.2.20

GATEWAY=10.81.2.1

NETMASK=255.255.255.0

DNS1=202.117.80.6

DNS2=202.117.80.7

其中,三台主机的IP分别为:Master:10.81.2.20;Segment1:10.81.2.21;Segment2:10.81.2.22。这样我们还可以通过termius软件远程访问, Termius是一款功能十分强劲且受用户喜爱的跨平台SSH工具,比用虚拟机直接操作更加方便便捷。

在安装greenplum之前我们需要先关闭selinux和防火墙,以后如果要打开防火墙,可以只允许greenplum数据库端口即可。SELinux 全称 Security Enhanced Linux (安全强化 Linux),是Linux内核的安全保镖。防火墙主要是借助硬件和软件的作用于内部和外部网络的环境间产生一种保护的屏障,从而实现对计算机不安全网络因素的阻断。只有在防火墙同意情况下,用户才能够进入计算机内,如果不同意就会被阻挡于外。

关闭或者开启防火墙的命令如下:

systemctl start firewalld.service#启动firewall

systemctl stop firewalld.service#停止firewall

systemctl disable firewalld.service#禁止firewall开机启动

systemctl enable firewalld.service#允许firewall开机启动

关闭selinux的命令如下:

sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config

修改完后需要重启系统让命令生效

开启防火墙,并预留gp端口命令如下:

firewall-cmd --zone=public --permanent --add-port=5432/tcp

重载服务命令如下:

firewall-cmd --reload

检测端口是否开启命令如下:

firewall-cmd --query-port=5432/tcp

然后需要在/etc/sysctl.conf文件中加入有关共享内存与网络参数配置的内容,具体命令如下:

vi /etc/sysctl.conf

加入以下内容

net.ipv4.ip_forward = 0

net.ipv4.conf.default.accept_source_route = 0

kernel.sysrq = 1

kernel.core_uses_pid = 1

net.ipv4.tcp_syncookies = 1

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.sem = 250 64000 100 512

kernel.shmmax = 500000000

kernel.shmmni = 4096

kernel.shmall = 4000000000

net.ipv4.tcp_tw_recycle = 1

net.ipv4.tcp_max_syn_backlog = 4096

net.core.netdev_max_backlog = 10000

vm.overcommit_memory = 2

net.ipv4.conf.all.arp_filter = 1

修改完后,输入“:”,wq保存命令并退出。

然后在/etc/security/limits.conf文件中加入限制参数,修改后内容如下:

cat /etc/security/limits.conf

# /etc/security/limits.conf

#

#This file sets the resource limits for the users logged in via PAM.

#It does not affect resource limits of the system services.

#

#Also note that configuration files in /etc/security/limits.d directory,

#which are read in alphabetical order, override the settings in this

#file in case the domain is the same or more specific.

#That means for example that setting a limit for wildcard domain here

#can be overriden with a wildcard setting in a config file in the

#subdirectory, but a user specific setting here can be overriden only

#with a user specific setting in the subdirectory.

#

#Each line describes a limit for a user in the form:

#

#<domain>        <type>  <item>  <value>

#

#Where:

#<domain> can be:

#        - a user name

#        - a group name, with @group syntax

#        - the wildcard *, for default entry

#        - the wildcard %, can be also used with %group syntax,

#                 for maxlogin limit

#

#<type> can have the two values:

#        - "soft" for enforcing the soft limits

#        - "hard" for enforcing hard limits

#

#<item> can be one of the following:

#        - core - limits the core file size (KB)

#        - data - max data size (KB)

#        - fsize - maximum filesize (KB)

#        - memlock - max locked-in-memory address space (KB)

#        - nofile - max number of open file descriptors

#        - rss - max resident set size (KB)

#        - stack - max stack size (KB)

#        - cpu - max CPU time (MIN)

#        - nproc - max number of processes

#        - as - address space limit (KB)

#        - maxlogins - max number of logins for this user

#        - maxsyslogins - max number of logins on the system

#        - priority - the priority to run user process with

#        - locks - max number of file locks the user can hold

#        - sigpending - max number of pending signals

#        - msgqueue - max memory used by POSIX message queues (bytes)

#        - nice - max nice priority allowed to raise to values: [-20, 19]

#        - rtprio - max realtime priority

#

#<domain>      <type>  <item>         <value>

#

 

#*               soft    core            0

#*               hard    rss             10000

#@student        hard    nproc           20

#@faculty        soft    nproc           20

#@faculty        hard    nproc           50

#ftp             hard    nproc           0

#@student        -       maxlogins       4

* soft nofile 65536

* hard nofile 65536

* soft nproc 131072

* hard nproc 131072

# End of file

然后执行命令“sysctl -p”让修改的参数生效,也可以重启系统。

下一步需要下载greenplum并编译安装。

1.下载(克隆)greenplum源码。

先安装git,通过yum install -y git命令安装,这里出现一个问题:yum通过配置的镜像源下载失败,通过查找资料发现原因是镜像源地址发生了更新变化,所以修改yum镜像源地址:具体通过修改yum配置文件:cat /etc/yum.repos.d/ns7-x86_64.repo更新镜像源地址。然后输入命令“yum install -y git”安装git,输入“git clone https://github.com/greenplum-db/gpdb”克隆greenplum源码,这里出现一个问题,git克隆失败,所以换另一种方法,在外部机器下载好greeplum的zip压缩包然后上传到麒麟虚拟机内部。

2.因为是编译安装greenplum,所以需要下载大量的依赖包,具体罗列如下:yum install -y curl-devel bzip2-devel python-devel openssl-devel wget perl-ExtUtils-Embed libxml2-devel openldap-devel pam pam-devel

yum install -y gcc-c++ libtool libaio bison vim-common.x86_64 vim-enhanced.x86_64 flex net-tools.x86_64 apr-devel

wget https://bootstrap.pypa.io/get-pip.py

python get-pip.py

pip install psi lockfile paramiko setuptools epydoc psutil

pip install --upgrade setuptools

这里出现一个问题:有时候yum install -y 某依赖包会出现失败的情况,反复尝试安装几次就可以成功。

3.编译安装greenplum

①进入gpdb目录(/opt/gpdb-master)。具体编译命令如下,我的安装目录在(/opt/gpsql):

cd /opt/gpdb-master

./configure --prefix=/opt/gpsql --with-gssapi --with-pgport=5432 --with-libedit-preferred --with-perl --with-python --with-openssl --with-pam --with-krb5 --with-ldap --with-libxml --enable-cassert --enable-debug --enable-testutils --enable-debugbreak --enable-depend

make

make install

这里出现一个问题,在执行./c

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/luozhenjie123/article/details/112645119

智能推荐

linux下编译GDAL外加扩展格式支持(五)--完-程序员宅基地

文章浏览阅读229次。接1、2、3、4篇。10、安装mysql支持安装fedora15或者16系统时若选择安装mysql数据库,则必须自行安装mysql开发包。因为自带默认数据库不会安装这个包。否则会遇到mysql错误:ogr_mysql.h:34:23: fatal error: my_global.h: No such file or directory#问题原因:找不到mysql头文件..._linux gdal netcdf5

Linux tc qdisc 模拟网络丢包延时-程序员宅基地

文章浏览阅读1.2k次。Linux tc qdisc 模拟网络丢包延时_tc qdisc

linux64bit 安装 jdk 1.7-程序员宅基地

文章浏览阅读336次。linux64bit 安装 jdk 1.7下载地址 : https://edelivery.oracle.com/otn-pub/java/jdk/7u21-b11/jdk-7u21-linux-x64.rpm0. 卸载rpm版的jdk: #rpm -qa|grep jdk 显示:jdk-1.6.0_10-fcs 卸载:#rpm -e --nodep..._liunx64位得jdk1.7

【Linux笔记】-----Nginx/LVS/HAProxy负载均衡的优缺点_中间件应用场景nginx lvs proxy-程序员宅基地

文章浏览阅读552次。开始听到负载均衡的时候,我第一反应想到的是链路负载均衡,在此之前主要是在学习网络方面知识,像在NA、NP阶段实验做链路负载均衡时常会遇到,后来还接触到SLB负载分担技术,这都是在链路基础上实现的。 其实负载均衡可以分为硬件实现负载均衡和软件实现负载均衡。 硬件实现负载均衡:常见F5和Array负载均衡器,配套专业维护服务,但是成本昂贵。 软件实现负载均衡:常见开源免费的负载均衡软件有Ngin..._中间件应用场景nginx lvs proxy

多维时序 | MATLAB实现CNN-LSTM多变量时序预测_cnn可以进行多步预测-程序员宅基地

文章浏览阅读4.7k次。多维时序 | MATLAB实现CNN-LSTM多变量时序预测目录多维时序 | MATLAB实现CNN-LSTM多变量多步预测基本介绍模型特点程序设计学习总结参考资料基本介绍本次运行测试环境MATLAB2020b,MATLAB实现CNN-LSTM多变量多步预测。模型特点深度学习使用分布式的分层特征表示方法自动提取数据中的从最低层到最高层固有的抽象特征和隐藏不变结构. 为了充分利用单个模型的优点并提高预测性能, 现已提出了许多组合模型。CNN 是多层前馈神经网络, 已被证明在提取隐藏_cnn可以进行多步预测

随便推点

【9.3】用户和组的管理、密码_polkitd:input 用户和组-程序员宅基地

文章浏览阅读219次。3.1 用户配置文件和密码配置文件3.2 用户组管理3.3 用户管理3.4 usermod命令3.5 用户密码管理3.6 mkpasswd命令_polkitd:input 用户和组

pca算法python代码_三种方法实现PCA算法(Python)-程序员宅基地

文章浏览阅读670次。主成分分析,即Principal Component Analysis(PCA),是多元统计中的重要内容,也广泛应用于机器学习和其它领域。它的主要作用是对高维数据进行降维。PCA把原先的n个特征用数目更少的k个特征取代,新特征是旧特征的线性组合,这些线性组合最大化样本方差,尽量使新的k个特征互不相关。关于PCA的更多介绍,请参考:https://en.wikipedia.org/wiki/Prin..._inprementation python code of pca

内存地址Linux下内存分配与映射之一-程序员宅基地

文章浏览阅读35次。发一下牢骚和主题无关:地址类型:32位的cpu,共4G间空,其中0-3G属于用户间空地址,3G-4G是内核间空地址。用户虚拟地址:用户间空程序的地址物理地址:cpu与内存之间的用使地址总线地址:外围总线和内存之间的用使地址内核逻辑地址:内存的分部或全体射映,大多数情况下,它与物理地址仅差一个偏移量。如Kmalloc分..._linux 内存条与内存地址

自动化测试介绍_自动化测试中baw库指的什么-程序员宅基地

文章浏览阅读1.3k次,点赞2次,收藏16次。什么是自动化测试?   做测试好几年了,真正学习和实践自动化测试一年,自我感觉这一个年中收获许多。一直想动笔写一篇文章分享自动化测试实践中的一些经验。终于决定花点时间来做这件事儿。  首先理清自动化测试的概念,广义上来讲,自动化包括一切通过工具(程序)的方式来代替或辅助手工测试的行为都可以看做自动化,包括性能测试工具(loadrunner、jmeter),或自己所写的一段程序,用于_自动化测试中baw库指的什么

a0图框标题栏尺寸_a0图纸尺寸(a0图纸标题栏尺寸标准国标)-程序员宅基地

文章浏览阅读1.6w次。A0纸指的是一平方米大小的白银比例长方形纸(长为1189mm宽为841mm)。A0=1189mm*841mm A1=841mm*594mm 相当于1/2张A0纸 A2=594mm*420mm 相当于1/4.A1图纸大小尺寸:841mm*594mm 即长为841mm,宽为594mm 过去是以多少"开"(例如8开或16开等)来表示纸张的大小,我国采用国际标准,规定以 A0、A1、A2、.GB/T 14..._a0图纸尺寸

TreeTable的简单实现_treetable canvas-程序员宅基地

文章浏览阅读966次。最终效果图:UI说明:针对table本身进行增强的tree table组件。 tree的数据来源是单元格内a元素的自定义属性:level和type。具体代码如下:Java代码 DepartmentEmployeeIDposi_treetable canvas