## openGauss-2.1.0部署文档 ### 1.从openGauss开源社区

openGauss-2.1.0部署文档

1.从openGauss开源社区下载对应平台的安装包。

通过https://opengauss.org/zh/download/登录openGauss开源社区,选择2.1.0版本对应平台极简版安装包。

2.解压安装包

tar -jxf openGauss-x.x.x-openEuler-64bit.tar.bz2 -C /opt/software/openGauss/

errer:
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

# 安装bzip2
yum -y install bzip2

3.软硬件环境要求

见官网

4.修改系统配置

4.1关闭防火墙
systemctl status firewalld
systemctl disable firewalld.service
systemctl stop firewalld.service
4.2关闭selinux
vim /etc/selinux/config

SELINUX=disabled

# 重启
reboot
4.3设置字符集参数
vim /etc/profile

export LANG=XXX”(XXX为Unicode编码)
4.4同步时区
4.5关闭swap交换内存(可选)
swapoff -a
4.6关闭RemoveIPC
vim  /etc/systemd/logind.conf

RemoveIPC=no

vim /usr/lib/systemd/system/systemd-logind.service

RemoveIPC=no

# 重新加载配置参数。
systemctl daemon-reload
systemctl restart systemd-logind

# 检查修改是否生效。
loginctl show-session | grep RemoveIPC
systemctl show systemd-logind | grep RemoveIPC

5.创建用户、用户组文件夹

6.修改文件打开数

vi /etc/security/limits.conf
 
# 在最后添加
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072

# 验证
ulimit -n

7.安装

cd /opt/software/openGauss/simpleInstall

sh install.sh -p 端口号 -w 密码 

8.管理数据库

# 连接数据库
gsql -d 库 -p 端口号 -U 用户

# 启动
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

# 创建用户
create user 新用户名 with password "你的密码";	2790hhxL

# 导出数据
su omm
./gs_dump  -f /docker-entrypoint-initdb.d/ficc.sql -p 5432 sigma_dev -n ficc -F p

# 导入数据
\i /xxx/ficc.sql

9.配置允许远程连接

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 = 1
# 重启
gs_ctl -D /opt/software/openGauss/data/single_node restart
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值