编译安装 openGauss 3.0.0

  1. 环境检查

    1.1 检查 OS 版本

    openGauss支持的操作系统:

CentOS 7.6(x86 架构)

openEuler-20.03-LTS(aarch64 架构)

openEuler-20.03-LTS(x86 架构)

Kylin-V10(aarch64 架构)

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

CentOS Linux release 7.6.1810 (Core)

1.2 修改主机名及/etc/hosts

hostnamectl set-hostname og

cat>>/etc/hosts<<EOF

... og

EOF

1.3. 检查防火墙和 selinux 在 RHEL 7 中,防火墙 firewalld 取代了 iptables

systemctl status firewalld

systemctl stop firewalld

systemctl disable firewalld

systemctl is-enabled firewalld

/bin/sed -i s/SELINUX=enforcing/SELINUX=disabled/ /etc/selinux/config

cat /etc/selinux/config|grep SELINUX=

setenforce 0

1.3 配置 yum 源并安装依赖包

上传操作系统 iso 到/soft 目录

[root@og3 ~]# mkdir -p /soft

[root@og3 ~]# cd /soft

[root@og3 soft]# ls -ltr

total 4481024

-rw-r--r--. 1 root root 4588568576 Apr 8 2019 CentOS-7-x86_64-DVD-1810.iso

cd /soft

mv CentOS-7-x86_64-DVD-1810.iso yum.iso

mount -o loop /soft/yum.iso /mnt

mkdir -p /etc/yum.repos.d/bak/

mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak/

cat>>/etc/yum.repos.d/rhel-source.repo <<EOF

[rhel-oracle-lib]

name=oracle

baseurl=file:///mnt

enabled=1

gpgcheck=0

EOF

yum clean all

yum makecache

yum list

yum -y install libaio-devel flex bison ncurses-devel glibc-devel patch redhat-lsb readline-devel unzip dos2unix vim git wget lrzsz net-tools bzip2 gcc tree zlib*

1.4 设置字符集参数

cat>>/etc/profile<<EOF

export LANG=zh_CN.UTF-8

EOF

1.5 设置时区和时间

[root@og ~]# timedatectl set-timezone Asia/Shanghai

[root@og ~]# timedatectl status

使用 date -s 命令将各主机的时间设置为统一时间,举例如下。

date -s "Sat Sep 27 16:00:07 CST 2020"

1.6 关闭 HISTORY 记录

cat>>/etc/profile<<EOF

HISTSIZE=0

EOF

2、安装 Python3 官方 建议安装 Python3.6

cd /soft/

wget -c https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz

mkdir -p /usr/local/python3.6.5

tar -zxvf Python-3.6.5.tgz

cd Python-3.6.5

./configure --prefix=/usr/local/python3.6.5 --enable-shared CFLAGS=-fPIC && make && make install

rm -f /usr/bin/python

ln -s /usr/local/python3.6.5/bin/python3 /usr/bin/python

ln -s /usr/local/python3.6.5/bin/python3 /usr/bin/python3

ln -s /usr/local/python3.6.5/bin/pip3 /usr/bin/pip3

cp /usr/local/python3.6.5/lib/libpython3.6m.so.1.0 /usr/lib64/

python -V

3. 下载软件包

cd /soft/

git clone https://gitee.com/opengauss/openGauss-server.git openGauss-server -b 3.0.0

git clone https://gitee.com/opengauss/openGauss-OM.git

wget -c https://opengauss.obs.cn-south-1.myhuaweicloud.com/3.0.0/openGauss-third_party_binarylibs.tar.gz

4. 一键式脚本编译

tar -xf openGauss-third_party_binarylibs.tar.gz

mv openGauss-third_party_binarylibs binarylibs

cd openGauss-server/

sh build.sh -m debug -3rd /soft/binarylibs -pkg

显示如下内容,表示编译成功。

success!

生成的安装包会存放在./output目录下。

编译和打包日志为:./build/script/makemppdb_pkg.log。

  1. openGauss-OM 编译

    cd /soft/openGauss-OM

    chmod +x build.sh

    export BINARYLIBS_PATH=/soft/binarylibs (这里填写前面的第三方软件包解压后的目录)

    ./build.sh -3rd $BINARYLIBS_PATH

    显示以下内容,表示 Gauss-OM 编译成功:

ROOT_DIR: /soft/binarylibs

Everything is ready.

success!

5. 软件安装

5.1 程序下载及解压

mkdir -p /opt/software/openGauss

mv /soft/openGauss-server/output/_ /opt/software/openGauss/

mv /soft/openGauss-OM/package/_ /opt/software/openGauss/

chmod 755 -R /opt/software

cd /opt/software/openGauss/

tar -jxf openGauss-3.0.0-CentOS-64bit.tar.bz2

tar -xf openGauss-3.0.0-CentOS-64bit-om.tar.gz

5.2 创建用户

groupadd dbgrp

useradd omm -g dbgrp

echo "Root_1234"|passwd --stdin omm

5.3 生成配置文件

cat >> /opt/software/openGauss/cluster_config.xml <<-EOF

  <!--dbnode-->
<param name="dataNum" value="1" />
<param name="dataPortBase" value="15400" />
<param name="dataNode1" value="/opt/huawei/install/data/dn" />
<param name="dataNode1_syncNum" value="0" />
</DEVICE>

EOF

5.4 初始化安装环境

cd /opt/software/openGauss/script

./gs_preinstall -U omm -G dbgrp -L -X /opt/software/openGauss/cluster_config.xml

6. 执行安装

su - omm

gs_install -X /opt/software/openGauss/cluster_config.xml

7. 初始化数据库

[root@og openGauss]# su - omm

Last login: Mon May 9 19:28:07 CST 2022 on pts/1

7.1 检查数据库状态

[omm@og ~]$ gs_om -t status

执行如下命令检查数据库状态是否正常,“cluster_state ”显示“Normal”表示数据库可正常使用。

[omm@og ~]$ gsql -d postgres -p 15400

openGauss=# CREATE DATABASE mydb WITH ENCODING 'GBK' template = template0;

CREATE DATABASE

openGauss=#

编译安装openGauss 3.0.0的更多相关文章

  1. ubuntu14.04下编译安装ambari-2.4.2.0

    ubuntu14.04下编译安装ambari-2.4.2.0 编译前的准备工作 准备工作有: 系统参数 系统依赖(编译环境) 离线安装包 java环境 maven环境 Nodejs环境 git环境 a ...

  2. centos 6.5 编译安装了 Nginx1.6.0+MySQL5.6.19+PHP5.5.14

    centos 6.5 编译安装了 Nginx1.6.0+MySQL5.6.19+PHP5.5.14--------------------------------------------------- ...

  3. 编译安装GCC 5.2.0

    https://blog.atime.me/note/install-gcc-5.2.0-from-source.html 记录编译GCC 5.2.0时遇到的问题和解决方法,以备日后查询. 平时使用的 ...

  4. Ubuntu 16.04源码编译安装nginx 1.10.0

    一.下载相关的依赖库 pcre 下载地址 http://120.52.73.43/jaist.dl.sourceforge.net/project/pcre/pcre/8.38/pcre-8.38.t ...

  5. 编译安装centos6.9 php7.0 mysql5.6 nginx1.8

    2018年3月15日 11:41:40 注意文章时效! 此文章不是给新用户参考的,没有每一步的操作,请注意! yum -y groupinstall "Development Tools&q ...

  6. CentOS 6.5 下编译安装 Nginx 1.8.0

    转自:https://i.cnblogs.com/EditPosts.aspx?postid=8303227&update=1 安装编译依赖的包 yum -y install gcc gcc- ...

  7. centos7编译安装LNMP(nginx-1.16.0,mysql8.0.16,php-7.3.6)常见问题报错及解决方法

    LNMP的安装与配置 nginx-1.16.0安装及配置: 第一步:前往官网下载nignx源码包 下载完毕后上传至服务器(先安装lrzsz) yum -y install lrzsz 安装完毕后执行: ...

  8. Centos7下源码编译安装与配置redis5.0

    1.下载redis5.0源码包 wget http://download.redis.io/releases/redis-5.0.5.tar.gz 2.检查是否安装过之前的历史版本 rpm -qa|g ...

  9. CentOS 6.7 编译安装Nginx 1.8.0

    1.配置编译环境 yum update && yum upgrade yum groupinstall "Development Tools" 或者 yum ins ...

  10. 在 Linux 下用 CMAKE 编译安装 OpenCV 3.2.0

    [安装相关软件和库] 1.安装CMAKE:这里使用apt-get来安装; CMAKE 是一个跨平台编译工具,能够输出各种makefile,和project 文件,指导编译器编译,对CMAKE具体的可以 ...

随机推荐

  1. 【Azure 服务总线】Spring Cloud 的应用 使用Service Bus 引起 org.springframework.beans.BeanInstantiationException 异常,无法启动

    问题描述 Spring Cloud 的应用原本正常运行,但是重新发布了一次应用后,发现使用 Service Bus 服务的应用都无法启动并报 BeanInstantiationException  异 ...

  2. C++ mySQL数据库连接池(windows平台)

    C++ MySQL数据库连接池 新手学了C++多线程,看了些资料练手写了C++数据库连接池小项目,自己的源码地址 关键技术点 MySQL数据库编程.单例模式.queue队列容器.C++11多线程编程. ...

  3. 电子设备内幕:RAM和ROM小百科

    大家好,我是知微. 在智能手机出现之前,大家对RAM和ROM这两个词都没什么概念.如今很多手机在宣传的时候,都会标明有多大的RAM(运行内存)和ROM(存储空间),因为这在很大程度上影响手机的使用流畅 ...

  4. Java 理解“万事万物皆对象”+ 匿名对象的使用

    1 /** 2 * 3 * @Description 4 * @author Bytezero·zhenglei! Email:420498246@qq.com 5 * @version 6 * @d ...

  5. electron暴露配置文件(用户可随时修改)

    配置文件 一般web前端项目配置文件,写死的放在src/config下,需要打包配置的放在.env文件中.但在electron项目中,如果配置数据更改,需要每次给用户打包升级肯定是行不通的.于是外部配 ...

  6. VSCode 配置 Spring Boot 项目开发环境

    神器IDEA在升级到2023之后越发卡顿, EDU邮箱也不能用了, 照现在这个JDK版本的升级速度, 神器不升级也不行, 需要开始物色替代品. 其它IDE我用得少, VSCode还是比较熟悉的, 可以 ...

  7. Python函数对象与闭包函数

    [一]函数对象 函数对象指的是函数可以被当做 数据 来处理,具体可以分为四个方面的使用 [1]函数可以被引用 def add(x,y): return x + y func = add res = f ...

  8. MacOS安装gRPC C++

    从源码安装gRPC C++ 环境准备 $ [sudo] xcode-select --install $ brew install autoconf automake libtool shtool $ ...

  9. [学习笔记]Rocket.Chat业务数据备份

    Rocket.Chat 的业务数据主要存储于mongodb数据库的rocketchat库中,聊天中通过发送文件功能产生的文件储存于/app/uploads中(文件方式设置为"FileSyst ...

  10. 词根 ten 展开 持有 /tin/tent/tain “to hold”

    词根 ten 展开 持有 /tin/tent/tain "to hold" 记忆方式:en是拿出.忘了从哪里看的了.t是动作过去. 如果是 过去的时候已经拿出来,那就是 展开 延展 ...