1.安装openEuler操作系统
(1)操作系统安装
略
(2)依赖包安装
[root@openeulertest ~]# yum install libaio-devel flex bison ncurses-devel glibc-devel patch redhat-lsb-core readline-devel libnsl -y
2.安装openGauss数据库
2.1 下载数据库安装包
(1)以root用户登录待安装openGauss的主机,并按规划创建存放安装包的目录
[root@openeulertest ~]# mkdir -p /opt/software/openGauss
[root@openeulertest ~]# chmod 755 -R /opt/software
注:不建议把安装包的存放目录规划到openGauss用户的家目录或其子目录下,可能导致权限问题。openGauss用户须具有/opt/software/openGauss目录的读写权限。
(2)下载数据库安装包到安装包目录
通过 https://opengauss.org/zh/download.html 登录openGauss开源社区,选择2.0.0版本对应平台企业版安装包
(3)解压安装包
[root@openeulertest ~]# cd /opt/software/openGauss/
[root@openeulertest openGauss]# tar -jxvf openGauss-3.1.0-openEuler-64bit.tar.bz2
2.2 修改系统配置
(1)关闭防火墙
[root@openeulertest ~]# vi /etc/selinux/config
修改SELINUX=disabled
[root@openeulertest ~]# systemctl stop firewalld.service
(2)设置字符集
[root@openeulertest ~]# vi /etc/profile
export LANG=en_US.UTF-8
[root@openeulertest ~]# source /etc/profile
(3)关闭RemoveIPC
[root@openeulertest ~]# vi /etc/systemd/logind.conf
"RemoveIPC”值为“no”
[root@openeulertest ~]# systemctl daemon-reload
[root@openeulertest ~]# systemctl restart systemd-logind
[root@openeulertest ~]# loginctl show-session | grep RemoveIPC
[root@openeulertest ~]# systemctl show systemd-logind | grep RemoveIPC
(4)设置网卡MTU值
使用如下命令将各数据库节点的网卡MTU值设置为相同大小。对于X86,MTU值推荐1500(默认),对于ARM,MTU值推荐8192。
ifconfig 网卡名称 mtu mtu值
(5)设置时区和时间
[root@openeulertest ~]#cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
(6)创建用户组
[root@openeulertest ~]# groupadd dbgrp
[root@openeulertest ~]# useradd omm -G dbgrp
[root@openeulertest ~]# id omm
uid=1003(omm) gid=1004(omm) groups=1004(omm),1003(dbgrp)
(7)安装目录授权
[root@openeulertest software]# chown -R omm:dbgrp openGauss/
[omm@openeulertest software]$ chmod -R 755 openGauss/
(8)执行安装
[root@openeulertest ~]# su - omm
[omm@openeulertest ~]$ cd /opt/software/openGauss/simpleInstall/
[omm@openeulertest simpleInstall]$ ll
total 56K
-rw-r-----. 1 omm dbgrp 11K Sep 29 14:32 finance.sql
-rw-r-----. 1 omm dbgrp 13K Sep 29 14:32 install.sh
-rw-r-----. 1 omm dbgrp 5.0K Sep 29 14:32 README.md
-rw-r-----. 1 omm dbgrp 20K Sep 29 14:32 school.sql
[omm@openeulertest simpleInstall]$ sh install.sh -w "Slm123456"
[step 1]: check parameter
[step 2]: check install env and os setting
[step 3]: change_gausshome_owner
[step 4]: set environment variables
/home/omm/.bashrc: line 11: ulimit: open files: cannot modify limit: Operation not permitted
[step 6]: init datanode
gs_initdb: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory
[step 7]: start datanode
gs_ctl: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory
import sql file
Would you like to create a demo database (yes/no)?
[omm@openeulertest simpleInstall]$ ps -ef |grep gauss
opengau+ 1154 1 0 14:33 ? 00:00:44 /usr/local/opengauss/bin/gaussdb -D /var/lib/opengauss/data
omm 25142 24150 0 17:29 pts/0 00:00:00 grep --color=auto gauss
[bigsong@localhost simpleInstall]$ gsql -d postgres -p 5432
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。