其他分享
首页 > 其他分享> > 华为openGauss单节点安装流程

华为openGauss单节点安装流程

作者:互联网

准备工作:

  1. 完成用户组和普通用户的创建。
  2. 所有服务器操作系统和网络均正常运行。
  3. 普通用户必须有数据库包解压路径、安装路径的读、写和执行操作权限,并且安装路径必须为空。
  4. 普通用户对下载的openGauss压缩包有执行权限。
  5. python要升级到3.7版本,可参考前一篇文章

可参考官方流程,点击跳转

以下为本人具体安装流程:

login as: root
root@192.168.197.135's password:
Last login: Mon Jan 10 21:37:20 2022 from 192.168.197.1
[root@bogon ~]# groupadd dbgrp
[root@bogon ~]# useradd -g dbgrp -G root -d /home/omm -m -s /bin/bash omm
[root@bogon ~]# passwd omm
更改用户 omm 的密码 。
新的 密码:
无效的密码: 密码少于 8 个字符
重新输入新的 密码:
passwd:所有的身份验证令牌已经成功更新。
[root@bogon ~]# mkdir -p /opt/software/openGauss
[root@bogon ~]# chmod 777 -R /opt
[root@bogon ~]# cd /opt/software/openGauss
[root@bogon openGauss]# vim /etc/sysctl.conf
[root@bogon openGauss]# sysctl -p
kernel.sem = 250 32000 100 999
[root@bogon openGauss]# cd ..
[root@bogon software]# ll
总用量 0
drwxrwxrwx. 2 root root 6 1月  11 18:19 openGauss
[root@bogon software]# cd ..
[root@bogon opt]# ll
总用量 85484
drwxrwxrwx. 4 root root       28 10月 29 2020 containerd
-rwxrwxrwx. 1 root root 87531625 1月   7 22:47 openGauss-2.1.0-CentOS-64bit.tar.bz2
drwxrwxrwx. 3 root root       25 1月  10 21:46 rh
drwxrwxrwx. 3 root root       23 1月  11 18:19 software
[root@bogon opt]# tar -jxf openGauss-2.1.0-CentOS-64bit.tar.bz2 -C /opt/software/openGauss/
[root@bogon opt]# ^C
[root@bogon opt]# ^C
[root@bogon opt]# cd /opt/software/openGauss/
[root@bogon openGauss]# ll
总用量 16
drwxr-xr-x. 3 root root 4096 9月  30 14:39 bin
drwxr-xr-x. 3 root root   22 9月  30 14:39 etc
drwxr-xr-x. 3 root root   24 9月  30 14:39 include
drwxr-xr-x. 4 root root   95 9月  30 14:39 jre
drwxr-xr-x. 5 root root 4096 9月  30 14:39 lib
drwxr-xr-x. 5 root root   53 9月  30 14:39 share
drwxr-xr-x. 2 root root   78 9月  30 14:39 simpleInstall
-rw-r--r--. 1 root root   32 9月  30 14:39 version.cfg
[root@bogon openGauss]# rm -rf *
[root@bogon openGauss]# ll
总用量 0
[root@bogon openGauss]# cd ..
[root@bogon software]# ll
总用量 0
drwxrwxrwx. 2 root root 6 1月  11 18:24 openGauss
[root@bogon software]# cd ..
[root@bogon opt]# ll
总用量 85484
drwxrwxrwx. 4 root root       28 10月 29 2020 containerd
-rwxrwxrwx. 1 root root 87531625 1月   7 22:47 openGauss-2.1.0-CentOS-64bit.tar.bz2
drwxrwxrwx. 3 root root       25 1月  10 21:46 rh
drwxrwxrwx. 3 root root       23 1月  11 18:19 software
[root@bogon opt]# su - omm
[omm@bogon ~]$ cd /opt/
[omm@bogon opt]$ ll
总用量 85484
drwxrwxrwx. 4 root root       28 10月 29 2020 containerd
-rwxrwxrwx. 1 root root 87531625 1月   7 22:47 openGauss-2.1.0-CentOS-64bit.tar.bz2
drwxrwxrwx. 3 root root       25 1月  10 21:46 rh
drwxrwxrwx. 3 root root       23 1月  11 18:19 software
[omm@bogon opt]$ tar -jxf openGauss-2.1.0-CentOS-64bit.tar.bz2 -C /opt/software/openGauss/
[omm@bogon opt]$ cd software/openGauss/
[omm@bogon openGauss]$ ll
总用量 16
drwxr-xr-x. 3 omm dbgrp 4096 9月  30 14:39 bin
drwxr-xr-x. 3 omm dbgrp   22 9月  30 14:39 etc
drwxr-xr-x. 3 omm dbgrp   24 9月  30 14:39 include
drwxr-xr-x. 4 omm dbgrp   95 9月  30 14:39 jre
drwxr-xr-x. 5 omm dbgrp 4096 9月  30 14:39 lib
drwxr-xr-x. 5 omm dbgrp   53 9月  30 14:39 share
drwxr-xr-x. 2 omm dbgrp   78 9月  30 14:39 simpleInstall
-rw-r--r--. 1 omm dbgrp   32 9月  30 14:39 version.cfg
[omm@bogon openGauss]$ cd simpleInstall/
[omm@bogon simpleInstall]$ ll
总用量 56
-rw-r--r--. 1 omm dbgrp 10883 9月  30 14:39 finance.sql
-rw-r--r--. 1 omm dbgrp 12842 9月  30 14:39 install.sh
-rw-r--r--. 1 omm dbgrp  5167 9月  30 14:39 README.md
-rw-r--r--. 1 omm dbgrp 19926 9月  30 14:39 school.sql
[omm@bogon simpleInstall]$ ll
总用量 56
-rw-r--r--. 1 omm dbgrp 10883 9月  30 14:39 finance.sql
-rw-r--r--. 1 omm dbgrp 12842 9月  30 14:39 install.sh
-rw-r--r--. 1 omm dbgrp  5167 9月  30 14:39 README.md
-rw-r--r--. 1 omm dbgrp 19926 9月  30 14:39 school.sql
[omm@bogon simpleInstall]$ sh install.sh -w 123456@Xh
[step 1]: check parameter
[step 2]: check install env and os setting
[step 3]: change_gausshome_owner
chmod: 更改"/opt/software/openGauss" 的权限: 不允许的操作
[step 4]: set environment variables

/home/omm/.bashrc: 第 16 行:ulimit: open files: 无法修改 limit 值: 不允许的操作
[step 6]: init datanode
The files belonging to this database system will be owned by user "omm".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

creating directory /opt/software/openGauss/data/single_node ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 32MB
creating configuration files ... ok
Begin init undo subsystem meta.
[INIT UNDO] Init undo subsystem meta successfully.
creating template1 database in /opt/software/openGauss/data/single_node/base/1 ... The core dump path is an invalid directory
2022-01-11 18:26:26.480 [unknown] [unknown] localhost 140579549557696 0[0:0#0]  [BACKEND] WARNING:  macAddr is 12/703722452, sysidentifier is 797169/4090820980, randomNum is 247003508
ok
initializing pg_authid ... ok
setting password ... ok
initializing dependencies ... ok
loading PL/pgSQL server-side language ... ok
creating system views ... ok
creating performance views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
initialize global configure for bucketmap length ... ok
creating information schema ... ok
loading foreign-data wrapper for distfs access ... ok
loading foreign-data wrapper for hdfs access ... ok
loading foreign-data wrapper for log access ... ok
loading hstore extension ... ok
loading foreign-data wrapper for MOT access ... ok
loading security plugin ... ok
update system tables ... ok
creating snapshots catalog ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
freezing database template0 ... ok
freezing database template1 ... ok
freezing database postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run gs_initdb.

Success. You can now start the database server of single node using:

    gaussdb -D /opt/software/openGauss/data/single_node --single_node
or
    gs_ctl start -D /opt/software/openGauss/data/single_node -Z single_node -l logfile

[step 7]: start datanode
[2022-01-11 18:26:44.642][34347][][gs_ctl]: gs_ctl started,datadir is /opt/software/openGauss/data/single_node
[2022-01-11 18:26:44.762][34347][][gs_ctl]: waiting for server to start...
.0 LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

0 LOG:  [Alarm Module]Host Name: bogon

..........0 LOG:  [Alarm Module]Host IP: 192.168.197.135

0 LOG:  [Alarm Module]Cluster Name: dbCluster

0 LOG:  [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 55

0 WARNING:  failed to open feature control file, please check whether it exists: FileName=gaussdb.version, Errno=2, Errmessage=No such file or directory.
0 WARNING:  failed to parse feature control file: gaussdb.version.
0 WARNING:  Failed to load the product control file, so gaussdb cannot distinguish product version.
The core dump path is an invalid directory
2022-01-11 18:26:55.284 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  when starting as multi_standby mode, we couldn't support data replicaton.
gaussdb.state does not exist, and skipt setting since it is optional.2022-01-11 18:26:55.291 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

2022-01-11 18:26:55.291 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host Name: bogon

...........2022-01-11 18:27:06.634 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host IP: 192.168.197.135

2022-01-11 18:27:06.634 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Cluster Name: dbCluster

2022-01-11 18:27:06.634 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 55

2022-01-11 18:27:06.645 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  loaded library "security_plugin"
2022-01-11 18:27:06.650 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2022-01-11 18:27:06.657 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] WARNING:  No explicit IP is configured for listen_addresses GUC.
2022-01-11 18:27:06.659 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0.
2022-01-11 18:27:06.659 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for backend threads is: 220 MB
2022-01-11 18:27:06.659 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for WAL buffers is: 128 MB
2022-01-11 18:27:06.659 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  Set max backend reserve memory is: 348 MB, max dynamic memory is: 11069 MB
2022-01-11 18:27:06.660 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  shared memory 358 Mbytes, memory context 11417 Mbytes, max process memory 12288 Mbytes
2022-01-11 18:27:06.686 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [CACHE] LOG:  set data cache  size(402653184)
2022-01-11 18:27:06.701 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [CACHE] LOG:  set metadata cache  size(134217728)
2022-01-11 18:27:06.739 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [SEGMENT_PAGE] LOG:  Segment-page constants: DF_MAP_SIZE: 8156, DF_MAP_BIT_CNT: 65248, DF_MAP_GROUP_EXTENTS: 4175872, IPBLOCK_SIZE: 8168, EXTENTS_PER_IPBLOCK: 1021, IPBLOCK_GROUP_SIZE: 4090, BMT_HEADER_LEVEL0_TOTAL_PAGES: 8323072, BktMapEntryNumberPerBlock: 2038, BktMapBlockNumber: 25, BktBitMaxMapCnt: 512
2022-01-11 18:27:06.812 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  gaussdb: fsync file "/opt/software/openGauss/data/single_node/gaussdb.state.temp" success
2022-01-11 18:27:06.818 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  create gaussdb state file success: db state(STARTING_STATE), server mode(Normal)
2022-01-11 18:27:06.819 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  max_safe_fds = 977, usable_fds = 1000, already_open = 13
The core dump path is an invalid directory
2022-01-11 18:27:06.827 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  user configure file is not found, it will be created.
2022-01-11 18:27:06.858 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  the configure file /opt/software/openGauss/etc/gscgroup_omm.cfg doesn't exist or the size of configure file has changed. Please create it by root user!
2022-01-11 18:27:06.858 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [BACKEND] LOG:  Failed to parse cgroup config file.
2022-01-11 18:27:06.902 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2022-01-11 18:27:06.902 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2022-01-11 18:27:06.902 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2022-01-11 18:27:06.902 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
2022-01-11 18:27:06.904 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2022-01-11 18:27:06.904 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2022-01-11 18:27:06.904 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2022-01-11 18:27:06.904 [unknown] [unknown] localhost 139931296465856 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
.
[2022-01-11 18:27:07.970][34347][][gs_ctl]:  done
[2022-01-11 18:27:07.970][34347][][gs_ctl]: server started (/opt/software/openGauss/data/single_node)
import sql file
Would you like to create a demo database (yes/no)? yes
Load demoDB [school,finance] success.
[complete successfully]: You can start or stop the database server using:
    gs_ctl start|stop|restart -D $GAUSSHOME/data/single_node -Z single_node

[omm@bogon simpleInstall]$ ps ux | grep gaussdb
omm       34350  4.1 20.9 2835920 390004 pts/0  Sl   18:26   0:01 /opt/software/openGauss/bin/gaussdb -D /opt/software/openGauss/data/single_node
omm       34459  0.0  0.0 112824   988 pts/0    S+   18:27   0:00 grep --color=auto gaussdb

标签:11,bogon,01,unknown,华为,18,openGauss,root,节点
来源: https://blog.csdn.net/weixin_42193489/article/details/122438968