Opengauss数据库学习二:CentOS7虚拟机安装Opengauss

下载OpengaussOpengauss数据库学习二:CentOS7虚拟机安装Opengauss_第1张图片

Opengauss数据库学习二:CentOS7虚拟机安装Opengauss_第2张图片

要在CentOS 7上安装openGauss,可以按照以下步骤进行操作:

确保你的CentOS 7系统已经安装并配置好,并且具备基本的网络访问能力。
下载openGauss的安装包,可以从openGauss官方网站或其他可信的来源获取。
解压下载的安装包,并进入解压后的目录。
运行安装脚本,例如:./install.sh。
在安装过程中,按照提示进行操作,选择适当的选项,例如安装路径、数据库配置等。
安装完成后,启动openGauss服务,并确保服务正常运行。
需要注意的是,具体的安装步骤可能会因为openGauss的版本和你的系统环境而有所不同。因此,建议在安装前仔细阅读openGauss的官方文档,并根据你的实际情况进行适当的调整。

安装openGauss

将文件openGauss-5.1.0-CentOS-64bit.tar.bz2移动到CentOS虚拟机并解压安装
在这里插入图片描述

1.使用普通用户登录到openGauss包安装的主机,解压openGauss压缩包到安装目录。

tar -jxf openGauss-x.x.x-openEuler-64bit.tar.bz2 -C /opt/software/openGauss
2.假定解压包的路径为/opt/software/openGauss,进入解压后目录下的simpleInstall。

cd /opt/software/openGauss/simpleInstall
3.执行install.sh脚本安装openGauss。

sh install.sh -w “xxxx” &&source ~/.bashrc
说明:

-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权限的用户执行如下命令。

sysctl -w kernel.sem=“250 85000 250 330”
安装后,数据库目录安装路径/opt/software/openGauss/data/single_node,其中/opt/software/openGauss为解压包路径,data/single_node为新创建的数据库节点目录。

安装完成后,默认生成名称为postgres的数据库。第一次连接数据库时可以连接到此数据库。

4.安装执行完成后,使用ps和gs_ctl查看进程是否正常。

ps ux | grep gaussdb
gs_ctl query -D /opt/software/openGauss/data/single_node
执行ps命令,显示类似如下信息:

omm 24209 11.9 1.0 1852000 355816 pts/0 Sl 01:54 0:33 /opt/software/openGauss/bin/gaussdb -D /opt/software/openGauss/single_node
omm 20377 0.0 0.0 119880 1216 pts/0 S+ 15:37 0:00 grep --color=auto gaussdb
执行gs_ctl命令,显示类似如下信息:

gs_ctl query ,datadir is /opt/software/openGauss/data/single_node
HA state:
local_role : Normal
static_connections : 0
db_state : Normal
detail_information : Normal

Senders info:
No information

Receiver info:
No information

你可能感兴趣的:(数据库,学习,课程设计,java)