CentOS安装openGauss2.0.1
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的更多相关文章
- 【推荐】CentOS安装Tomcat-7.0.57+启动配置+安全配置+性能配置
注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. #准备工作# 在安装Tomcat之前,请确保已经安装了JDK-1.7环境,具体见<CentOS安装JDK-1.7>. ...
- 【推荐】CentOS安装vsftpd-3.0.2+安全配置
注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. FTP的登录一般有三种方式,分别是: 匿名用户形式:默认安装的情况下,系统只提供匿名用户访问,只需要输入用户anonymous/f ...
- centos 安装php7.0.2
PHP7.0正式版已经在2015年11月份左右发布,目前是PHP7.0.2版本,本人最早是从2015年8月php7的第一个测试版跟起,现在正式版发布. linux版本:64位CentOS 6.6 Ng ...
- 【推荐】CentOS安装vsftpd-3.0.3+安全配置
注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. FTP的登录一般有三种方式,分别是: 匿名用户形式:默认安装的情况下,系统只提供匿名用户访问,只需要输入用户anonymous/f ...
- CentOS 安装mongodb3.0 二进制包
1.下载mongodb因为64位系统CentOS,所以下载64位的安装包: wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0 ...
- CentOS安装GlassFish4.0 配置JDBC连接MySQL
转自:http://linux.it.net.cn/CentOS/course/2014/0724/3319.html 版本glassfish-4.0.zip 1.解压,拷贝到指定安装路径 unz ...
- centos 安装mysql8.0.16
清除自带的mariadb > rpm -qa|grep mariadb mariadb-libs-5.5.44-2.el7.centos.x86_64 > rpm -e --nodeps ...
- centos 安装 mongo3.0
官方网站传贴,每次去翻doc,麻烦 vi /etc/yum.repos.d/mongodb-org-3.0.repo [mongodb-org-3.0]name=MongoDB Repository ...
- centos安装tomcat7.0.70
抄自:https://www.cnblogs.com/www1707/p/6592504.html apache-tomcat-7.0.70jdk-7u67-linux-x64 下载tomcathtt ...
- centos 安装mongodb3.0
一.添加yum源 vi /etc/yum.repos.d/mongodb-org-3.0.repo 请添加如下配置(64位系统): [mongodb-org-3.0] name=MongoDB Rep ...
随机推荐
- Go 基础之基本数据类型
Go 基础之基本数据类型 目录 Go 基础之基本数据类型 一.整型 1.1 平台无关整型 1.1.1 基本概念 1.1.2 分类 有符号整型(int8~int64) 无符号整型(uint8~uint6 ...
- [自制工具]简便易用的ADDM报告生成工具
■■ Oracle ADDM简介 ADDM全称是Automatic Database Diagnostic Monitor,是Oracle实现性能自我诊断的最佳利器.它依赖于AWR,我们知道AWR会自 ...
- Python3 Keras分词器Tokenizer
import keras.preprocessing.sequence from keras.preprocessing.text import Tokenizer samples = ['我 爱 你 ...
- 【算法】游戏中的学习,使用c#面向对象特性控制游戏角色移动
最近,小悦的生活像是一首繁忙的交响曲,每天忙得团团转,虽然她的日程安排得满满当当,但她并未感到充实.相反,她很少有时间陪伴家人,这让她感到有些遗憾.在周五的午后,小悦的哥哥突然打来电话,他的声音里充满 ...
- python~windows自动化工具 uiautomation库
微软提供了关于自动化操作PC端桌面应用程序的工具,官方描述为: Microsoft UI Automation is an accessibility framework that enables W ...
- go mod tidy总是安装最新依赖,如何查找哪个模块导致某个包安装最新依赖,提供一个小工具
安装: go install github.com/jan-bar/interesting/findModVer@latest 执行:findModVer d:\myproject 结果如下图所示: ...
- APIO 2023 游记
真心话大冒险很有趣. rand 一个房间去敲门加 QQ 很有趣.这么看社恐猫好像也没那么社恐. 面到了 zpl pcq iee dx.单方面认识了很多神仙. 比赛只会写暴力,评测 queue 害人不浅 ...
- 组合的输出 题解(lgP1157)
一看就是 dfs 然而窝并不会做 调了一个多小时才调出来.漏洞连篇.(第一次写的基本没有对的地方QAQ 题解见注释. #include<bits/stdc++.h> using names ...
- ArcMap属性表出现乱码情况的解决
本文介绍ArcMap软件打开图层的属性表后,出现字段中汉字乱码情况的解决方法. 有时在使用ArcMap软件时,会发现一些图层的属性表中,原本应该是中文的字段却出现乱码的情况:如下图所示,其中N ...
- CF1401B [Ternary Sequence]
Problem 题目简述 两个序列 \(A, B\).这两个序列都是由 \(0,1,2\) 这三个数构成. \(x_1,y_1,z_1\) 和 \(x_2,y_2,z_2\) 分别代表 \(A\) 序 ...