centos7 安裝openGauss極簡版本


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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM