CentOS安装openGauss2.0.1

OpenGauss是一款开源关系型数据库管理系统,采用木兰宽松许可证v2发行。openGauss内核源自PostgreSQL,深度融合华为在数据库领域多年的经验,结合企业级场景需求,持续构建竞争力特性。
安装前准备:
1、centos7.6+ x86 64位、修改内核
2、修改文件打开数
3、创建普通用户和用户组
4、安装bzip2
2021-4月发布了openGauss安装2.0.1,这里的centos为7.9

一、安装前准备

1.1 修改内核数
在root下,修改centos内核

vi /etc/sysctl.conf
# 修改内核参数,添加如下:(默认参数 250 32000 32 128)
kernel.sem=250 6400000 1000 25600 sysctl -p
cat /proc/sys/kernel/sem

1.2 创建用户、用户组文件夹

创建用户和用户组:

# 创建名称为opengaussgroup的组
groupadd -g 1001 opengaussgroup
# 创建名称为opengauss的用户,并添加用户组
useradd -u 2001 -g opengaussgroup opengauss
# 修改用户密码(root下) ,假设修改为agree123
passwd opengauss #创建文件夹:
mkdir /opt/software/openGauss
# 赋予权限
chown -R opengauss:opengaussgroup /opt/software

1.3 修改文件打开数

vi /etc/security/limits.conf

# 在最后添加
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072

PS:
查看文件打开数:ulimit -n
临时生效修改:ulimit -n 65536

提前安装好bzip2和依赖:

yum -y install bzip2
# 安装依赖软件包
yum install libaio-devel flex bison ncurses-devel glibc-devel patch redhat-lsb-core readline-devel -y

然后重启系统。

reboot

二、安装

此时,将用户切换到普通用户su opengauss

2.1 上传安装包

使用1.2节创建的用户来上传安装包到 /opt/software/,执行解压:

su opengauss
tar -jxf openGauss-2.0.1-CentOS-64bit.tar.bz2 -C /opt/software/openGauss

2.2 执行安装

执行安装

# 查看防火墙状态
systemctl status firewalld
# 关闭防火墙
ufw disable
systemctl stop firewalld.service
cd /opt/software/openGauss/simpleInstall
sh install.sh -w Agree123 -p 5432
# 配置环境变量
echo "PATH=/opt/software/openGauss/bin:\$PATH" >> /home/opengauss/.bash_profile
source /home/opengauss/.bash_profile
# 连接数据库,密码Agree123,端口可修改,默认5432
gsql -d postgres -p 5432 -r

三、管理数据库

3.1 启动/关闭数据库

# 启动
gs_ctl -D /opt/software/openGauss/data/single_node start
# 关闭
gs_ctl -D /opt/software/openGauss/data/single_node stop
# 重启
gs_ctl -D /opt/software/openGauss/data/single_node restart # 连接数据库
gsql -d postgres -p 5432 -r

3.2 配置允许远程连接

cd /opt/software/openGauss/data/single_node
vi pg_hba.conf
# 允许所有网段连接 在IPv4 local connections下添加
host all all 0.0.0.0/0 md5 vi postgresql.conf
# 将前面#去掉,改为*
listen_addresses = '*' # 允许navicat连接设置,password_encryption_type改为0
password_encryption_type=0
# 重启
gs_ctl -D /opt/software/openGauss/data/single_node restart # 然后重新修改密码即可
gsql -d postgres -p 5432 -r
su postgres
# 创建用户
CREATE USER agree IDENTIFIED BY 'Lingkang123';
# 查看密码是否MD5保存了
select rolname,rolpassword from pg_authid;
# 修改密码
alter user agree with encrypted password 'Lingkang123456';

四、其他说明

4.1 资料文档

搭建当前最新版本,opengauss 2.0说明了与之前版本保持兼容:
https://opengauss.org/zh/news/2021-04-01/20210401.htmlhttps://opengauss.org/zh/news/2021-04-01/20210401.html

软硬件要求:
https://opengauss.org/zh/docs/2.0.1/docs/installation/%E5%87%86%E5%A4%87%E8%BD%AF%E7%A1%AC%E4%BB%B6%E5%AE%89%E8%A3%85%E7%8E%AF%E5%A2%831.html
1、centos 7.6+
2、提前安装好bzip2:
yum -y install bzip2
3、创建好普通用户,因为opengauss只能在普通用户下安装

极简单节点搭建教程:
https://opengauss.org/zh/docs/2.0.1/docs/installation/%E5%8D%95%E8%8A%82%E7%82%B9%E5%AE%89%E8%A3%85.html

安装完成校验:
https://opengauss.org/zh/docs/2.0.1/docs/installation/%E5%AE%89%E8%A3%85%E9%AA%8C%E8%AF%81.html

CentOS安装openGauss2.0.1的更多相关文章

  1. 【推荐】CentOS安装Tomcat-7.0.57+启动配置+安全配置+性能配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. #准备工作# 在安装Tomcat之前,请确保已经安装了JDK-1.7环境,具体见<CentOS安装JDK-1.7>. ...

  2. 【推荐】CentOS安装vsftpd-3.0.2+安全配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. FTP的登录一般有三种方式,分别是: 匿名用户形式:默认安装的情况下,系统只提供匿名用户访问,只需要输入用户anonymous/f ...

  3. centos 安装php7.0.2

    PHP7.0正式版已经在2015年11月份左右发布,目前是PHP7.0.2版本,本人最早是从2015年8月php7的第一个测试版跟起,现在正式版发布. linux版本:64位CentOS 6.6 Ng ...

  4. 【推荐】CentOS安装vsftpd-3.0.3+安全配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. FTP的登录一般有三种方式,分别是: 匿名用户形式:默认安装的情况下,系统只提供匿名用户访问,只需要输入用户anonymous/f ...

  5. CentOS 安装mongodb3.0 二进制包

    1.下载mongodb因为64位系统CentOS,所以下载64位的安装包: wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0 ...

  6. CentOS安装GlassFish4.0 配置JDBC连接MySQL

    转自:http://linux.it.net.cn/CentOS/course/2014/0724/3319.html 版本glassfish-4.0.zip 1.解压,拷贝到指定安装路径   unz ...

  7. centos 安装mysql8.0.16

    清除自带的mariadb > rpm -qa|grep mariadb mariadb-libs-5.5.44-2.el7.centos.x86_64 > rpm -e --nodeps ...

  8. centos 安装 mongo3.0

    官方网站传贴,每次去翻doc,麻烦 vi  /etc/yum.repos.d/mongodb-org-3.0.repo [mongodb-org-3.0]name=MongoDB Repository ...

  9. centos安装tomcat7.0.70

    抄自:https://www.cnblogs.com/www1707/p/6592504.html apache-tomcat-7.0.70jdk-7u67-linux-x64 下载tomcathtt ...

  10. centos 安装mongodb3.0

    一.添加yum源 vi /etc/yum.repos.d/mongodb-org-3.0.repo 请添加如下配置(64位系统): [mongodb-org-3.0] name=MongoDB Rep ...

随机推荐

  1. firewalld规则配置

    firewalld规则配置 一.概念 动态防火墙 启动新规则时,不会像iptables一样,先清空规则,再启动所有规则,如此会对现在程序有影响,哪怕只是一条规则.而firewalld 规则变更不需要对 ...

  2. c语言代码练习3

    //查看数字是否存在于数组中#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> int main() { int i = 0; int ...

  3. 前端三件套系例之HTML——HTML5基础

    1.HTML 1-1 什么是HTML HTML是用来制作网页的标记语言 HTML是Hypertext Markup Language的英文缩写,即超文本标记语言 HTML语言是一种标记语言,不需要编译 ...

  4. fatal: 无法访问 'https://github.com/nmww/lingyun.git/':Failed to connect to github.com port 443 after 13 ms: Connection refused

    fatal: 无法访问 'https://github.com/nmww/lingyun.git/':Failed to connect to github.com port 443 after 13 ...

  5. win10系统单独编译和使用WebRTC的回声消除(AEC)、音频增益(AGC)、去噪(NS)模块

    一.简介 本人想单独编译并使用WebRTC的音频回声消除模块,奈何技术有限,于是在百度的海洋里大海捞针,发现了https://www.cnblogs.com/mod109/p/5827918.html ...

  6. Meteors 题解

    Meteors 蒟蒻初学整体二分,写一篇题解记录一下思考与看法. 题目大意 在一个环形的轨道上分别着若干国家的空间站,在接下来的一段时间内会出现若干次陨石,每次出现在环形的某一段轨道,每个国家都想收集 ...

  7. Android WebAPIOperator

    package com.example.myapplication2.models.CommonClasses; import org.json.JSONObject; import java.io. ...

  8. IDEA的Maven换源

    打开IDEA安装路径,然后打开下面的文件夹 plugins\maven\lib\maven3\conf 在conf文件目录下出现一个setting.xml的文件.(ps:如果没有,请忽略本文,自行创建 ...

  9. 从零实现的浏览器Web脚本

    从零实现的浏览器Web脚本 在之前我们介绍了从零实现Chrome扩展,而实际上浏览器级别的扩展整体架构非常复杂,尽管当前有统一规范但不同浏览器的具体实现不尽相同,并且成为开发者并上架Chrome应用商 ...

  10. sed 原地替换文件时遇到的趣事

    哈喽大家好,我是咸鱼 在文章<三剑客之 sed>中咸鱼向大家介绍了文本三剑客中的 sed sed 全名叫 stream editor,流编辑器,用程序的方式来编辑文本 那么今天咸鱼打算讲一 ...