" />

警告:即将离开本站

点击"继续"将前往其他页面,确认后跳转。

侧边栏壁纸
  • 累计撰写 19 篇文章
  • 累计创建 2 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

centos 7.5 安装 openGauss 6.0.0-RC1 极简版

dengdz
2024-11-06 / 0 评论 / 0 点赞 / 24 阅读 / 0 字
  • 系统环境:centos 7.5

  • 安装版本:openGauss 6.0.0-RC1 极简版

1. 环境准备

  1. 安装系统依赖

yum install libaio-devel flex bison ncurses-devel glibc-devel patch redhat-lsb-core readline-devel zlib readline bzip2 lrzsz
  1. 检查python版本

[gauss@docker openGauss]$ python --version
Python 2.7

安装openGauss需要系统python版本为 3.6+

# 安装3.6版本
yum install python36
# 软连接
ln -sf /usr/bin/python3 /usr/bin/python

软连接后会导致yum不可用,需要修改一下文件的python解释器为python2.7

/usr/bin/yum-config-manager

/usr/bin/yum

/usr/libexec/urlgrabber-ext-down

2. 安装openGauss

  1. 下载安装包

mkdir -p /home/docker/openGauss-6/
cd /home/docker/openGauss-6/
wget https://opengauss.obs.cn-south-1.myhuaweicloud.com/6.0.0-RC1/x86/openGauss-6.0.0-RC1-CentOS-64bit.tar.bz2
mkdir /home/docker/openGauss-6/openGauss
  1. 解压

tar -jxf openGauss-6.0.0-RC1-CentOS-64bit.tar.bz2 -C ./openGauss
  1. 新建用户

由于安装时不能使用root用户,所以新建一个 gauss用户

useradd gauss
echo gauss | passwd --stdin gauss

chown -R gauss:gauss /home/docker/openGauss-6/openGauss
  1. 安装openGauss

su gauss
cd /home/docker/openGauss-6/openGauss/simpleInstall
sh install.sh  -w "Enmo@123" &&source ~/.bashrc

3. 远程连接

由于默认的超级管理员用户 omm 不允许远程连接,所以需要修改配置以及创建新用户

  1. 修改配置

vim /home/docker/openGauss-6/openGauss/data/single_node/pg_hba.conf

添加以下两行

host all all 192.168.100.222/32 md5

host all all 0.0.0.0/0 md5

#192.168.100.222/32需要替换成自己虚拟机的IP地址

vim /home/docker/openGauss-6/openGauss/data/single_node/postgresql.conf

#删掉listen_address前面的#,并把它的的值改为‘*’

#删掉password_encryption_type前面的#,并把它的的值改为0

  1. 重启服务

./bin/gs_ctl restart -D data/single_node -Z single_node
  1. 新建用户

gsql -d postgres -p 5432
CREATE USER dj PASSWORD 'Dengj@123';

GRANT ALL PRIVILEGES TO dj;
  1. 客户端工具连接

0

评论区