ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

centos7 安装openGauss极简版本

2021-12-14 23:00:38  阅读:195  来源: 互联网

标签:极简 gs gsql omm centos7 openGauss 安装 bogon


1 基础环境准备:

系统:

[root@bogon ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[root@bogon ~]#

相关软件:

安装netstat,由于centos7默认不带这个命令需要单独安装

yum install net-tools -y

安装bzip2 因为官方的安装包是openGauss-x.x.x-openEuler-64bit.tar.bz2 不安装这个软件直接解压命令报错

yum -y install bzip2 -y

修改内核的配置因为在你安装install命令的时候会出现如下报错

On systemwide basis, the maximum number of SEMMNI is not correct. the current SEMMNI value is: 128. Please check it.

解决:在/etc/sysctl.conf中加入语句kernel.sem = 250 32000 100 999,然后执行sysctl -p
安装wget 命令用于下载openGauss的软件包

 wget https://opengauss.obs.cn-south-1.myhuaweicloud.com/2.1.0/x86/openGauss-2.1.0-CentOS-64bit.tar.bz2

关闭防火墙和selinux

## 关闭防火墙 
systemctl status firewalld
systemctl disable firewalld.service
systemctl stop firewalld.service

## 关闭SELinux
sed -i '/SELINUX=/d' etc/selinux/config
echo "SELINUX=disabled" >> /etc/selinux/config
cat etc/selinux/config|grep -v ^#|grep -v '^$'

输入这个命令selinux直接关闭不用重启

setenforce 0 

2 安装环境准备:

groupadd -g 1001 dbgrp
useradd -u 2001 -g dbgrp omm
mkdir -p /opt/software/openGauss
chown -R omm:dbgrp opt切换omm用户安装 [root@db1 ~]# su - omm [omm@db1 ~]$ cd /opt/software/openGauss/ [omm@db1 openGauss]$ tar -jxf openGauss-2.1.0-CentOS-64bit.tar.bz2 -C /opt/software/openGauss/
安装:[omm@bogon ~]$ cd /opt/software/openGauss/simpleInstall/ [omm@bogon simpleInstall]$ ls finance.sql install.sh README.md school.sql [omm@bogon simpleInstall]$ sh install.sh -w gauss#123 - -w:初始化数据库密码(gs_initdb指定),安全需要必须设置。 -p:指定的openGauss端口号,如不指定,默认为5432。 -h|–help:打印使用说明。 安装后,该数据库部署结点的名称为sgnode(gs_initdb指定)。 执行时,如果出现报错“the maximum number of SEMMNI is not correct, the current SEMMNI is xxx. Please check it.”,请使用有root权限的用户执行如下命令 。
安装成功会出现如下界面:
启动成功:[omm@bogon ~]$ gs_ctl start -D $GAUSSHOME/data/single_node -Z single_node [2021-12-14 15:32:45.083][11887][][gs_ctl]: gs_ctl started,datadir is /opt/software/openGauss/data/single_node [2021-12-14 15:32:45.089][11887][][gs_ctl]: another server might be running; Please use the restart command [omm@bogon ~]$ gsql -d postgres -p -r failed to connect Unknown:-r. [omm@bogon ~]$ gsql -d postgres -p gsql:选项需要一个参数 -- p Try "gsql --help" for more information. [omm@bogon ~]$ gsql -d postgres -p 5432 -r gsql ((openGauss 2.1.0 build 590b0f8e) compiled at 2021-09-30 14:29:04 commit 0 last mr ) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help. openGauss=# \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+-------+----------+-------------+-------------+------------------- postgres | omm | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | omm | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/omm + | | | | | omm=CTc/omm template1 | omm | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/omm + | | | | | omm=CTc/omm (3 rows) openGauss=# \q文档写的很粗糙,但是安装完使用完全没有问题。参考连接:https://opengauss.org/zh/docs/2.1.0/docs/installation/%E5%8D%95%E8%8A%82%E7%82%B9%E5%AE%89%E8%A3%85.html

标签:极简,gs,gsql,omm,centos7,openGauss,安装,bogon
来源: https://www.cnblogs.com/Thenext/p/15690462.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有